asweigart / asweigart/PythonStdioGames

Four in a Row bug

Open
#15 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
971
Forks
216
PR merge metrics
No merged PRs in 30d

Description

A reader submitted this:

I have had
some problems with "four in the row"; it crashed at irregular intervals (for
example, a 2 times 2 square of markers almost always crashed), and sometimes
played worse than a beginner, actually selecting the worst possible move.
Being a former programmer, I decided to investigate this, and found out that
both problems had the same root -- the "worst fitness" is not -1, it is a far
greater negative number (I saw at least -70 during my debug session).
Changing the losing constant and the initial value in the computer move
selection to, for example, -1000, seems to fix this issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.