erp12 / pyshgp

Push Genetic Programming in Python.
http://erp12.github.io/pyshgp
MIT License
74 stars 23 forks source link

Bug in gp.py #49

Closed Vaguery closed 7 years ago

Vaguery commented 7 years ago

I've just cloned a fresh repo (and upgraded all my Python binaries), and when I run an example (any of the three) I get the following:

[all the standard setup works OK]

Creating Initial Population
Traceback (most recent call last):
  File "examples/integer_regression.py", line 60, in <module>
    gp.evolution(error_func, problem_params)
  File "/usr/local/lib/python2.7/site-packages/pyshgp/gp/gp.py", line 166, in evolution
    population = generate_random_population(evolutionary_params)
  File "/usr/local/lib/python2.7/site-packages/pyshgp/gp/gp.py", line 97, in generate_random_population
    rand_genome = r.random_plush_genome(evolutionary_params)
TypeError: random_plush_genome() takes exactly 2 arguments (1 given)
Vaguery commented 7 years ago

I notice the call signatures are, in fact, different:

https://github.com/erp12/Pysh/search?utf8=✓&q=random_plush_genome

So the bug seems to be in https://github.com/erp12/Pysh/blob/4882e2983c6489015b133a41fb40a612f2cccc9b/pyshgp/gp/gp.py#L97

erp12 commented 7 years ago

Looks like I accidentally pushed some of an upcoming refactor in my docs branch which later got merged into master. I really need to get the rest of the unit tests into circle CI so that I can't finalize a Pull Request without finding this stuff :)

Thanks for reporting this! I will should be able to fix this later today.

erp12 commented 7 years ago

Should be fixed in #51. Also, installation instructions have been updated.

@Vaguery Let me know if you can run the examples now. (Also, FWIW there are more than 3 examples, but only three of them have dedicated pages on the documentation site. See the examples folder in the repo.)

Vaguery commented 7 years ago

You want to add the "made doc pages for all demos" Issue? :)

Vaguery commented 7 years ago

Working.

erp12 commented 7 years ago

You want to add the "made doc pages for all demos" Issue? :)

It existed before this one (#47). Thanks for closing this issue, glad things are working.