Skip to content

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

@GoogleCodeExporter

Description

@GoogleCodeExporter
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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions