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

ConnectFour- Game: inside actions method - listcomprehension issue causes traceback #37

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. use of a minimaxplay, or alphabeta player on ConnectFour
2. running play_game
3.

What is the expected output? What do you see instead?
argmax() first argument is an empty list which will not have set[0] position

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

Please provide any additional information below.
The simple fix of changing line: 293 list comprehension: y == 1 instead of 0
[(x, y) for (x, y) in state.moves if y == 1 or (x, y-1) in state.board]

the initial board is defined to not contain moves that have a y of zero
therefor making any initial move impossible. This will return an empty list and 
cause a traceback

Original issue reported on code.google.com by Luke.Fra...@gmail.com on 16 Oct 2013 at 5:42

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