$ go version
go version go1.16.6
Run the following command to download the modules:
$ go mod download
Start the project with the default parameters:
$ go run cmd/ci-f6-implementation/main.go
You can also customize a few parameters. In order to show them you can run:
$ go run cmd/ci-f6-implementation/main.go -h
Usage of path\to\main.exe:
-b int
The chromosome bits size (default 44)
-c float
The crossover rate (default 0.65)
-g int
The maximum number of generations (default 40)
-m float
The mutation rate (default 0.008)
-max float
The domain maximum (default 100)
-min float
The domain minimum (default -100)
-p int
The population size (default 100)
You are able to build the project by running:
$ go build -o ci-f6-implementation.exe cmd/ci-f6-implementation/main.go
This will compile the project into an executable named ci-f6-implementation.exe
.
To keep golang format style run the following:
$ gofmt -l -s -w .
Student: João Vitor Almeida de Oliveira
E-mail: [email protected]