Open cosmoharrigan opened 8 years ago
Here's the line where it occurs: https://github.com/opencog/moses/blob/master/examples/example-progs/moses-ann-pole1.cc#L58
The program says that it should be invoked as usage: moses-ann-pole1 maxevals seed but it looks as though it actually expects to receive 6 command line arguments: max evals, seed, stepsize, expansion, depth, reduce https://github.com/opencog/moses/blob/master/examples/example-progs/moses-ann-pole1.cc#L58
If I try running it with 6 command line arguments, then I receive an error
terminate called after throwing an instance of 'opencog::AssertionException'
what(): (/home/cosmo/moses/moses/comboreduct/reduct/../combo/convert_ann_combo.h:117)
Aborted (core dumped)
https://github.com/opencog/moses/blob/master/moses/comboreduct/combo/convert_ann_combo.h#L117
Any suggestions?
I can't replicate it now (not in my computer right now), but let me try help you. For the first error you already figure it out.
On Wed, Nov 11, 2015 at 1:48 AM, Cosmo Harrigan notifications@github.com wrote:
If I try running it with 6 command line arguments, then I receive an error
terminate called after throwing an instance of 'opencog::AssertionException' what(): (/home/cosmo/moses/moses/comboreduct/reduct/../combo/convert_ann_combo.h:117) Aborted (core dumped)
https://github.com/opencog/moses/blob/master/moses/comboreduct/combo/convert_ann_combo.h#L117
Any suggestions?
— Reply to this email directly or view it on GitHub https://github.com/opencog/moses/issues/26#issuecomment-155662193.
For this second, could you put the values that you tried?
Thanks @arleyristar. For example, I tried
./moses-ann-pole1 10 1 1 2 5 1
After executing it, it freezes; and then, if you press enter, it displays that stack trace and terminates.
It should have worked, these are basically default values. Could you try another examples?
On Wed, Nov 11, 2015 at 2:09 AM, Cosmo Harrigan notifications@github.com wrote:
Thanks @arleyristar https://github.com/arleyristar. For example, I tried
./moses-ann-pole1 10 1 1 2 5 1
After executing it, it freezes; and then, if you press enter, it displays that stack trace and terminates.
— Reply to this email directly or view it on GitHub https://github.com/opencog/moses/issues/26#issuecomment-155668065.
Sorry for the delay, my crap hotel internet isn't helping. So, for the line that you said, it's trying to decode a tree that is empty... I've changed this examples for last, but it was a simple thing and it was working before (Linas wouldn't accept my commit if not). Maybe tomorow I'll try to find what broke it, if Linas or Nil don't see it first.
On Wed, Nov 11, 2015 at 2:18 AM, Arley Ristar arley@ristar.me wrote:
It should have worked, these are basically default values. Could you try another examples?
On Wed, Nov 11, 2015 at 2:09 AM, Cosmo Harrigan notifications@github.com wrote:
Thanks @arleyristar https://github.com/arleyristar. For example, I tried
./moses-ann-pole1 10 1 1 2 5 1
After executing it, it freezes; and then, if you press enter, it displays that stack trace and terminates.
— Reply to this email directly or view it on GitHub https://github.com/opencog/moses/issues/26#issuecomment-155668065.
If you guys start using the NN part, please by all means, add a unit test for it. The lack of unit test is the reason this code has gotten broken over time.
@ngeiswei Indeed; perhaps it would make sense to use one of the existing NN examples as a unit test?
@arleyristar The unit tests all pass. It would be great if you can try this out on your machine when you get back.
Yes indeed there is some ANN unit test. Once you understand the problem you should complete the unit test to cover that case, or as @cosmoharrigan suggests create a unit test based on the example.
Do these examples even make sense? It wasn't clear to me that the ANN examples were any good. Note also: now that the POS (particle-swarm-optimization) code is integrated, doesn't that change the motivation to use ANN's in moses? The examples should include some description as to why they are worthy.
Do these examples even make sense?
@linas In what sense? From an abstract point of view, the pole balancing/inverted pendulum problem is a classic benchmark in control theory. But, I don't know about the specifics of how these examples were implemented.
I meant "do they use moses in a way that makes sense; i.e. do they actually demonstrate something that moses would be good at solving (as opposed to using moses as a fancy random-number generator)"
--linas
On Thu, Nov 12, 2015 at 12:58 AM, Cosmo Harrigan notifications@github.com wrote:
Do these examples even make sense?
@linas https://github.com/linas In what sense? From an abstract point of view, the pole balancing/inverted pendulum problem is a classic benchmark in control theory. But, I don't know about the specifics of how these examples were implemented.
— Reply to this email directly or view it on GitHub https://github.com/opencog/moses/issues/26#issuecomment-155936423.
So, I replicated the "error" here. In these examples, you are supposed to pass the seed tree (cin >> tr, line 72), so when you press enter you are passing an empty tree, leading to this "error". About the usage: I don't know if moses-ann-pole1 was copied from another example (leaving the usage with a wrong msg), but some others examples, like moses-ann-pole2, uses maxevals, seed and the default value of 1.25, 1.5, 4 and true for the rest. I don't know much about this part, but for the seed tree in the xor example you could starting passing something like: ann($I2 $I3 1 0) or ann($N1($N2($I3 $I4 -1 1) $I3 $I4 1 -1 0.5))
So, Linas or Nil, you can close this issue, and tell Cosmo an example of seed tree.
On Thu, Nov 12, 2015 at 11:23 AM, Linas Vepštas notifications@github.com wrote:
I meant "do they use moses in a way that makes sense; i.e. do they actually demonstrate something that moses would be good at solving (as opposed to using moses as a fancy random-number generator)"
--linas
On Thu, Nov 12, 2015 at 12:58 AM, Cosmo Harrigan <notifications@github.com
wrote:
Do these examples even make sense?
@linas https://github.com/linas In what sense? From an abstract point of view, the pole balancing/inverted pendulum problem is a classic benchmark in control theory. But, I don't know about the specifics of how these examples were implemented.
— Reply to this email directly or view it on GitHub https://github.com/opencog/moses/issues/26#issuecomment-155936423.
— Reply to this email directly or view it on GitHub https://github.com/opencog/moses/issues/26#issuecomment-156114616.
Thanks @arleyristar . Although before closing I think it would be better to fix this example first so that it detects the missing argument and return an informative error message.
I receive a segmentation fault when I run the MOSES example program moses-ann-pole1 on Ubuntu 14.04.1 with GCC 4.8.4.
Preparation: mkdir build cd build ; cmake -DCMAKE_BUILD_TYPE=Debug .. ; make make examples cd ../examples/example-progs
Start gdb: gdb moses-ann-pole1
Run the program: (gdb) run 100 1
(gdb) backtrace