Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

games.py line 121 missing argument in call to legal_moves method #8

Closed
GoogleCodeExporter opened this issue Dec 15, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. call random_player(game,state) in games.py
2.
3.

What is the expected output? What do you see instead?

Expected: A valid move returned

Unexpected Outcome: 
Traceback (most recent call last):
  File "<pyshell#28>", line 1, in <module>
    games.random_player(game,gamestate)
  File "/aima-python-read-only/games.py", line 121, in random_player
    return random.choice(game.legal_moves(state))
TypeError: legal_moves() takes exactly 2 arguments (1 given)


What version of the product are you using? On what operating system?

Py 2.5.2 /linux latest aima code from svn

Please provide any additional information below.

To fix change line 121 
from:
return random.choice(game.legal_moves())
to:
return random.choice(game.legal_moves(state))



Original issue reported on code.google.com by nei...@gmail.com on 30 Jun 2008 at 1:55

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision r52.

Original comment by wit...@gmail.com on 1 Sep 2011 at 10:11

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant