You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add 3 levels of difficulty to the connect 4 AI for the user to choose from:
Easy: the current AI implementation
Medium: the AI also attempts to create 'winning corrdinates' (coordinates where placing a counter will result in a win, each player has a different set of winning coordinates which may overlap) and also attempts to prevent the user from creating such coordinates.
Hard: the AI will also account for 'parity' (I'm not sure what else to call it) between the winning coordinates; a winning coordinates for player 2 immediately above a winning coordinate for player 1 will be disregarded because it is unlikely for it to have an effect on the result of the game.
Reasoning
The current connect 4 AI is easy to beat for most users due to its simplicity. Adding harder difficulties will make it more challenging (and entertaining) for users who are more experienced with the game.
Proposed Implementation
The current AI class will be turned into a base class, where subclasses (for each difficulty) implement the play method.
The .connect_four ai command will be modified to accept an additional required argument, difficulty, that will determine which AI is used for the game.
Would you like to implement this yourself?
I'd like to implement this feature myself
Anyone can implement this feature
The text was updated successfully, but these errors were encountered:
As a side note, I haven't tested any of the harder difficulties yet (they're just based on my experience and how I play the game) so feel free to suggest any other ideas for harder bots!
Description
Add 3 levels of difficulty to the connect 4 AI for the user to choose from:
Reasoning
The current connect 4 AI is easy to beat for most users due to its simplicity. Adding harder difficulties will make it more challenging (and entertaining) for users who are more experienced with the game.
Proposed Implementation
The current
AI
class will be turned into a base class, where subclasses (for each difficulty) implement theplay
method.The
.connect_four ai
command will be modified to accept an additional required argument,difficulty
, that will determine which AI is used for the game.Would you like to implement this yourself?
The text was updated successfully, but these errors were encountered: