项目作者: SivanMehta

项目描述 :
Faster than Lance Armstrong don't @me
高级语言: Go
项目地址: git://github.com/SivanMehta/hill-climbing-go.git
创建时间: 2018-05-01T01:02:54Z
项目社区:https://github.com/SivanMehta/hill-climbing-go

开源协议:

下载


Trying to implement hill climbing to estimate the maximum value between x = [0, 10] for the following function in go:

  1. y = sin(x)

The correct answers(s) is are (π / 2, 1) and/or (5π / 2, 1)

Run make to run the optimization:

  1. $ make
  2. go build -o hill.out hill.go
  3. ./hill.out
  4. 2018/04/30 18:32:41 (probable) global max for math.Sin at x = 7.854477651926955
  5. 2018/04/30 18:32:41 (probable) global max for math.Cos at x = 12.566748149871607
  6. 2018/04/30 18:32:41 (probable) global max for math.Tan at x = 10.995501257174165