dnaProof

package
v0.0.0-...-fee3720 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FitnessLimit = 1000

Functions

func GetMediaProof

func GetMediaProof(imagePath string)

func GetProof

func GetProof(params TemperProofParams, blockTime time.Time) (string, string)

Types

type DnaOperator

type DnaOperator struct {
	// contains filtered or unexported fields
}

func NewOperator

func NewOperator(params TemperProofParams) *DnaOperator

type IOrganism

type IOrganism interface {
	// contains filtered or unexported methods
}

type ITrainer

type ITrainer interface {
	GetTrainingSet() map[int]string

	Train() string
	// contains filtered or unexported methods
}

type MediaOrganism

type MediaOrganism struct {
	DNA     *image.RGBA
	Fitness int64
}

type MediaProof

type MediaProof struct {
	Proof
	MediaType string
	// contains filtered or unexported fields
}

func (*MediaProof) LoadAndConvert

func (m *MediaProof) LoadAndConvert(imagePath string) *image.RGBA

type Organism

type Organism struct {
	DNA     []byte
	Fitness float64
	ParentA []byte
	ParentB []byte
	IOrganism
}

type Proof

type Proof struct {
	// contains filtered or unexported fields
}

func NewProof

func NewProof(data []byte) *Proof

type TemperProof

type TemperProof interface {
	// contains filtered or unexported methods
}

type TemperProofParams

type TemperProofParams struct {
	MutationRate   float64
	ParseDuration  time.Duration
	PopulationSize uint
	MaxFitness     float64
}

type Trainer

type Trainer struct {
	ITrainer
}

func NewTrainer

func NewTrainer() *Trainer

func (*Trainer) GetTrainingSet

func (t *Trainer) GetTrainingSet() map[int]string

func (*Trainer) Train

func (t *Trainer) Train() string

type TrainingData

type TrainingData struct {
	// contains filtered or unexported fields
}

type TrainingDataSet

type TrainingDataSet []TrainingData

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL