How to run a set of TWEANN benchmarks in Erlang correctly?

别来无恙 提交于 2019-12-13 02:37:32

问题


I've been reading Gene I Sher's Handbook to neuroevolution through Erlang and trying to replicate all the experiments described there. And it all worked, until I came to chapter 19, which read

Having set everything up, we execute the benchmark for every noted experimental setup, and run it to completion. To do this, we simply modify the constraints used in our benchmarker module, and then execute benchmarker:start(Experiment_Name), for every of our experimental setups.

There are 14 experiments altogether, named:


1. [SlidingWindow5]
2. [SlidingWindow10]
3. [SlidingWindow20]
4. [SlidingWindow50]
5. [SlidingWindow100]

and


1. [ChartPlane5X10]
2. [ChartPlane5X20]
3. [ChartPlane10X10]
4. [ChartPlane10X20]
5. [ChartPlane20X10]
6. [ChartPlane20X20]
7. [ChartPlane50X10]
8. [ChartPlane50X20]
9. [ChartPlane100x10]

Just starting a polis and running benchmarker:start(SlidingWindow5). in an erlang shell results in * 1: variable 'SlidingWindow5' is unbound.

I'm probably being obtuse and not doing something obvious, but I really wish to understand which arguments to pass to the benchmarker:start().

Reading the source code didn't help so far.

I think that reading the whole book is not necessary to figure out how to make this particular piece of code work.


回答1:


All right. I needed to use an all-lowercase name: benchmarker:start(slidingwindow5).. This answer is correct, but inconclusive; it gives the solution but does not explain why the solution is as it is from an Erlang perspective. Please don't upvote it until it does.



来源:https://stackoverflow.com/questions/36030579/how-to-run-a-set-of-tweann-benchmarks-in-erlang-correctly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!