39 lines
653 B
Go
39 lines
653 B
Go
// Copyright 2022 wanderer <a_mirre at utb dot cz>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
"sync"
|
|
|
|
"git.dotya.ml/wanderer/math-optim/algo"
|
|
"git.dotya.ml/wanderer/math-optim/report"
|
|
)
|
|
|
|
var version = "development"
|
|
|
|
func main() {
|
|
log.Println("starting math-optim version", "'"+version+"'")
|
|
|
|
// atm we're only doing Random search and SHC
|
|
algoCount := 2
|
|
|
|
var wg sync.WaitGroup
|
|
|
|
wg.Add(algoCount)
|
|
|
|
var m sync.Mutex
|
|
|
|
go algo.DoRandomSearch(&wg, &m)
|
|
go algo.DoStochasticHillClimbing(&wg, &m)
|
|
|
|
wg.Wait()
|
|
|
|
report.SaveTexAllPics()
|
|
report.SaveTexAllTables()
|
|
report.Print()
|
|
|
|
log.Println("looks like we're done")
|
|
}
|