问题
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 executebenchmarker: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