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

request: improve Connect-Four's minimax implementation #219

Closed
kyranet opened this issue Apr 18, 2024 · 0 comments · Fixed by #228
Closed

request: improve Connect-Four's minimax implementation #219

kyranet opened this issue Apr 18, 2024 · 0 comments · Fixed by #228
Assignees

Comments

@kyranet
Copy link
Member

kyranet commented Apr 18, 2024

The package uses minimax1 to determine the best move, however, the implementation is flawed, reporting only three states (OUTCOME_HUMAN_WINS, OUTCOME_MACHINE_WINS, or OUTCOME_DRAW), resulting on very bad moves which result on always playing the leftmost column.

This update would most likely only require a new method that's called inside the remaining == 0 conditions, replacing OUTCOME_DRAW with a call to the new method that evaluates the score heuristically.

Footnotes

  1. https://en.wikipedia.org/wiki/Minimax

@kyranet kyranet self-assigned this May 12, 2024
@kyranet kyranet linked a pull request May 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant