[WIP] Artificial Intelligence Personalities
OK, later today or tomorrow I'm going to start a new SVN branch of Forge which will be used for the implementation of my next, rather big scale, project - AI personalities.
RATIONALE: Even though Forge does not feature a super advanced artificial intelligence system such as Minimax, it has a fun competitive AI that can challenge the player given the right cards and circumstances. However, one of the primary downsides to the current Forge AI as I see it is its eventual predictability - that is, since the AI makes pretty much the same choices in the same situations every time, it becomes predictable and sometimes you just know that you can go ahead and attack and not risk losing an important card because the AI won't trade early, or you have a feeling just when the AI will block your attack because it considers it's low enough on life, and so on. Therefore, implementing a system that would allow to vary the AI choices depending on personality setups (somewhat similar, even if initially on a lesser scale, to the chess engine personality systems) and, thus, eliminating predictability would make the game more fun to play, especially for people who have played Forge for a while and have, therefore, learned the common decision-making patterns the standard AI follows.
PROPOSED IMPLEMENTATION: It is planned that AI personalities will be stored as Java preference files same in format as the current configuration files Forge uses. The currently proposed location is "res/ai". In every mode except Quest, the default personality can be set in the Forge preferences from a list box similar to the one utilized for themes. The top option is "Random", which will choose a random AI personality from the available ones every time a match is started, but only once per match (so, if you play a best of three and play all three matches, the personality will be the same). Optionally, it might be possible and viable to implement an extra mode called "Random (Crazy)" or something like that, in which the personality will be randomized in every duel instead of in every match, so that the opponent will be absolutely unpredictable. For Quest mode, it should be possible to store a specific AI personality choice inside the deck file (this is *only* true for quest mode deck files), so that the profile will be chosen for the AI opponent every time. If no AI personality is stored inside the deck file, or if the personality configuration can't be loaded for some reason (e.g. the file does not exist), the game should respect the choice made by the player in the Forge preferences.
SIDE PROJECTS: As this project is being developed, relatively minor tweaks to the core AI system may be made or proposed.
DEVELOPMENT: Development will be made in a separate branch, as this is a rather global and big-scale project that may break things quite severely in the initial development stages. The implementation will be as non-intrusive as possible, the new file loaders and personality-related processing facilities will be implemented as separate classes which can then be hooked up to the AI function calls. Retrieving a given setting for a given AI profile should be as simple as calling a static method of a specialized class.
TIME FRAME: Active development should start within 1-3 days. There is no current ETA on the project. I'll try not to take too much time, but sadly my real-life work is likely to interfere with this project quite severely, so it might take a while (I want to make sure I do it properly and carefully, too) - all the more reason to start a separate branch for this project.
COOPERATION: All forms of cooperation are welcome - in the form of suggestions, advice, constructive criticism, coding assistance, and testing alike.
- Agetian
RATIONALE: Even though Forge does not feature a super advanced artificial intelligence system such as Minimax, it has a fun competitive AI that can challenge the player given the right cards and circumstances. However, one of the primary downsides to the current Forge AI as I see it is its eventual predictability - that is, since the AI makes pretty much the same choices in the same situations every time, it becomes predictable and sometimes you just know that you can go ahead and attack and not risk losing an important card because the AI won't trade early, or you have a feeling just when the AI will block your attack because it considers it's low enough on life, and so on. Therefore, implementing a system that would allow to vary the AI choices depending on personality setups (somewhat similar, even if initially on a lesser scale, to the chess engine personality systems) and, thus, eliminating predictability would make the game more fun to play, especially for people who have played Forge for a while and have, therefore, learned the common decision-making patterns the standard AI follows.
PROPOSED IMPLEMENTATION: It is planned that AI personalities will be stored as Java preference files same in format as the current configuration files Forge uses. The currently proposed location is "res/ai". In every mode except Quest, the default personality can be set in the Forge preferences from a list box similar to the one utilized for themes. The top option is "Random", which will choose a random AI personality from the available ones every time a match is started, but only once per match (so, if you play a best of three and play all three matches, the personality will be the same). Optionally, it might be possible and viable to implement an extra mode called "Random (Crazy)" or something like that, in which the personality will be randomized in every duel instead of in every match, so that the opponent will be absolutely unpredictable. For Quest mode, it should be possible to store a specific AI personality choice inside the deck file (this is *only* true for quest mode deck files), so that the profile will be chosen for the AI opponent every time. If no AI personality is stored inside the deck file, or if the personality configuration can't be loaded for some reason (e.g. the file does not exist), the game should respect the choice made by the player in the Forge preferences.
SIDE PROJECTS: As this project is being developed, relatively minor tweaks to the core AI system may be made or proposed.
DEVELOPMENT: Development will be made in a separate branch, as this is a rather global and big-scale project that may break things quite severely in the initial development stages. The implementation will be as non-intrusive as possible, the new file loaders and personality-related processing facilities will be implemented as separate classes which can then be hooked up to the AI function calls. Retrieving a given setting for a given AI profile should be as simple as calling a static method of a specialized class.
TIME FRAME: Active development should start within 1-3 days. There is no current ETA on the project. I'll try not to take too much time, but sadly my real-life work is likely to interfere with this project quite severely, so it might take a while (I want to make sure I do it properly and carefully, too) - all the more reason to start a separate branch for this project.
COOPERATION: All forms of cooperation are welcome - in the form of suggestions, advice, constructive criticism, coding assistance, and testing alike.
- Agetian