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

Make the AI play a bit better in different situations #626

Open
strinsberg opened this issue Aug 4, 2020 · 1 comment
Open

Make the AI play a bit better in different situations #626

strinsberg opened this issue Aug 4, 2020 · 1 comment
Labels
discussion Discussion requested or required before resolving. feature request New feature or enhancement of existing feature.

Comments

@strinsberg
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
We discussed in the meeting today that the AI does not play Instruction cards well once it's method is full. There are also other situations where maybe the AI does not play the best or could play a little worse to allow for different difficulty levels.

Describe the solution you'd like
Come up with some ideas for different Card or Turn strategies that can be used to create Action modules to plug into the AI and make it more diverse.

The infrastructure is already there for this, but right now for the most part the PlayBestCard action is being used exclusively. It does very specific things and may not be perfectly tailored to the current game mode. This module could be sub-classed to override functionality to create different difficulty levels. Or we could start creating more individual Card and Strategy modules that will look at the game state and make better or worse decisions.

The beginner mode in 2.5 has already got a PlayRandomCard action that shuffles it's hand instead of sorting it by priorities so that its play is not as good and this will give beginners more time to play without the AI winning quickly.

Ideas

  • Don't play instructions once the method is full. This is a useless play in most situations for an AI that is trying to play well. We could setup something where we want a better AI to be more strategic about how it plays instructions cards when the method is full.
  • Check the current game state to see if there is a play that the AI could make to win the game. In some situations it may be possible for the AI to win, but they have a card priority that makes them play a different card. So perhaps a module could be setup for a specific personality to check first to see if any of the AI player's cards would win the game before trying its other priorities.
  • In the same spirit as the PlayRandomCard action we could introduce some modules with some differing levels of randomness to keep the AI from always making the "best" decision. Right now if it plays a repeat card or a virus card it will always play it on the stack with the highest score possible. We could setup something to make it pick the lowest, or favour higher ones, but not guarantee it.

Any other ideas about how the AI does or could play should be shared here for our records and we can think about making some changes in the future.

@strinsberg strinsberg added feature request New feature or enhancement of existing feature. discussion Discussion requested or required before resolving. labels Aug 4, 2020
@strinsberg
Copy link
Collaborator Author

In version2.5 I have changed the AI to not play instructions anywhere but in the method stack. Hopefully, this makes it a little smarter. Though in future versions it may be possible to add a module to an AI handler chain that checks to see if playing an instruction in the play area would be enough to win.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion requested or required before resolving. feature request New feature or enhancement of existing feature.
Projects
None yet
Development

No branches or pull requests

1 participant