func TraitWithId(traitId int, traits []*neat.Trait) *neat.Trait {
	if traitId != 0 && traits != nil {
		for _, tr := range traits {
			if tr.Id == traitId {
				return tr
			}
		}
	}
	return nil
}
TraitWithId Utility to select trait with given ID from provided Traits array
package genetics
import (
	"errors"
	"github.com/yaricom/goNEAT/v2/neat"
	"github.com/yaricom/goNEAT/v2/neat/network"
)
type innovationType byte
const (
	newNodeInnType innovationType = iota + 1
	newLinkInnType
)
type mutatorType byte
const (
	gaussianMutator mutatorType = iota + 1
	goldGaussianMutator
)
type GenomeEncoding byte
const (
	PlainGenomeEncoding GenomeEncoding = iota + 1
	YAMLGenomeEncoding
)
var (
	ErrUnsupportedGenomeEncoding = errors.New("unsupported genome encoding")
)