func (s *Species) addOrganism(o *Organism) {
	s.Organisms = append(s.Organisms, o)
}
Adds new Organism to the group related to this Species
package genetics
import (
	"context"
	"errors"
	"fmt"
	"github.com/yaricom/goNEAT/v2/neat"
	"io"
	"math"
	"math/rand"
	"sort"
)
type Species struct {
	Id int
	Age int
	MaxFitnessEver float64
	ExpectedOffspring int
	IsNovel bool
	Organisms Organisms
	AgeOfLastImprovement int
	IsChecked bool
}
func NewSpecies(id int) *Species {
	return newSpecies(id)
}
func NewSpeciesNovel(id int, novel bool) *Species {
	s := newSpecies(id)
	s.IsNovel = novel
	return s
}
func newSpecies(id int) *Species {
	return &Species{
		Id:        id,
		Age:       1,
		Organisms: make([]*Organism, 0),
	}
}
func (s *Species) Write(w io.Writer) error {
	_, avg := s.ComputeMaxAndAvgFitness()
	if _, err := fmt.Fprintf(w, "/* Species #%d : (Size %d) (AF %.3f) (Age %d)  */\n",
		s.Id, len(s.Organisms), avg, s.Age); err != nil {
		return err
	}
	sortedOrganisms := make(Organisms, len(s.Organisms))
	copy(sortedOrganisms, s.Organisms)
	sort.Sort(sort.Reverse(sortedOrganisms))
	for _, org := range sortedOrganisms {
		if _, err := fmt.Fprintf(w, "/* Organism #%d Fitness: %.3f Error: %.3f */\n",
			org.Genotype.Id, org.Fitness, org.Error); err != nil {
			return err
		}
		if org.IsWinner {
			if _, err := fmt.Fprintf(w, "/* ## $ WINNER ORGANISM FOR SPECIES #%d $ ## */\n", s.Id); err != nil {
				return err
			}
		}
		if err := org.Genotype.Write(w); err != nil {
			return err
		}
	}
	return nil
}