func (o *Organism) UnmarshalBinary(data []byte) error {
	b := bytes.NewBuffer(data)
	var genotypeId int
	if _, err := fmt.Fscanln(b, &o.Fitness, &o.Generation, &o.highestFitness, &o.isPopulationChampionChild, &genotypeId); err != nil {
		return err
	} else if o.Genotype, err = ReadGenome(b, genotypeId); err != nil {
		return err
	} else if o.Phenotype, err = o.Genotype.Genesis(genotypeId); err != nil {
		return err
	}
	return nil
}
UnmarshalBinary Decodes organism received over the wire during parallel reproduction cycle
package genetics
import (
	"bytes"
	"fmt"
	"github.com/yaricom/goNEAT/v2/neat/network"
)
type Organisms []*Organism
type OrganismData struct {
	Value interface{}
}
type Organism struct {
	Fitness float64
	Error float64
	IsWinner bool
	Phenotype *network.Network
	Genotype *Genome
	Species *Species
	ExpectedOffspring float64
	Generation int
	Data *OrganismData
	originalFitness float64
	toEliminate bool
	isChampion bool
	superChampOffspring int
	isPopulationChampion bool
	isPopulationChampionChild bool
	highestFitness float64
	mutationStructBaby bool
	mateBaby           bool
	Flag int
}
func NewOrganism(fit float64, g *Genome, generation int) (org *Organism, err error) {
	phenotype := g.Phenotype
	if phenotype == nil {
		phenotype, err = g.Genesis(g.Id)
		if err != nil {
			return nil, err
		}
	}
	org = &Organism{
		Fitness:    fit,
		Genotype:   g,
		Phenotype:  phenotype,
		Generation: generation,
	}
	return org, nil
}
func (o *Organism) UpdatePhenotype() (err error) {
	o.Phenotype = nil
	o.Phenotype, err = o.Genotype.Genesis(o.Genotype.Id)
	return err
}
func (o *Organism) CheckChampionChildDamaged() bool {
	if o.isPopulationChampionChild && o.highestFitness > o.Fitness {
		return true
	}
	return false
}
func (o *Organism) MarshalBinary() ([]byte, error) {
	var buf bytes.Buffer
	if _, err := fmt.Fprintln(&buf, o.Fitness, o.Generation, o.highestFitness, o.isPopulationChampionChild, o.Genotype.Id); err != nil {
		return nil, err
	} else if err = o.Genotype.Write(&buf); err != nil {
		return nil, err
	}
	return buf.Bytes(), nil
}