I would like to create/find an AI algorithm/process that can be parameterized such that a change in the parameters causes a change in the AI behavior. I am specifically looking to apply this to a turn based game environment where the player is able to perform several moves (or none at all) in a single turn. The player has full knowledge of the board and should be able to take the opponent's current positioning into account when deciding what moves to make in the current turn.
My question is how can I create this type of AI? An example of behavior that I would like it to show in various situations would be:
Turn X: Attack location A with 7 units and attack location C with 12 units
Turn Y: Do nothing
Turn Z: Invest in resource collection
Then a small change in a parameter may cause the AI to only send 6 units to location A instead of 7 in the same situation as Turn X.
My only thought of how to implement something like this would be to have the parameters act as probabilities of doing action T with magnitude R. However, I could imagine how this wouldn't facilitate long term thinking, and I also have no idea how that approach would take the opponent's positioning into account. I also suspect that this approach would cause the AI to overspend within a single turn, as in, it tries to attack 3 locations with a total of 30 units, but it only has 15.
I've spent the last few hours looking through Google Scholar and have found a few papers that say that they have used a parameterized AI approach, but they don't discuss any actual implementation details. If anyone could tell me what this concept is normally called (so I can Google and research it further) or has any reference links to code that uses an implementation like this then I would really appreciate you adding it as an answer.
Also, just so people don't waste their time answering something that isn't needed, I'm only interested in the design/structure of the described process, I am not looking for ways to get good values for the parameters.
Thanks everyone!
const byte AI_PULLCARD_MAX= 17; /*...*/ bool AI_ShouldPullAnotherCard(byte currentTotal){if (currentTotal <= AI_PULLCARD_MAX){return true;} return false;}
You do practically do the same with a very complex game AI too, but you have more methods, more parameters and a more complex decision logic (if-else blocks, switches etc.). \$\endgroup\$