AI Difficulty level differences (AI Hard, AI Easy)

Post Reply
Stratego (dev)
Site Admin
Posts: 15752
Joined: Fri Apr 25, 2014 9:28 pm

AI Difficulty level differences (AI Hard, AI Easy)

Post by Stratego (dev) »

Namings:
AI1: Rock Hard
AI2: Easy Peasy

Special handlings in code:
- AI1 is the neutral player AI
- AI1 is the player when it got kicked from multipalyer game.

A configuration structure we have already:

Code: Select all

public class AiDifficulty {
    public AiDifficulty(Defines.EController controllerType, ArrayList<EAblility> abilities) {
        this.controllerType = controllerType;
        this.abilities = abilities;
    }

    public enum EAblility {
        UPGRADE_TECHS, // invents upgrades for the units (eg. heavy knigt for knights)
        PROP_CHG_TECHS, // invents propery changer techs that affect this unit (eg. blacksmith techs)
        GRANT_THE_ALL_TECHS, // on game create the AI player  will get the default "all techs"
        USE_UPGRADE_UNITS, //if given than it will train units that needs to be bought in upgrades section.
        AI_SILLY_MOVEMENT,  // means AI uits will not move that far as they could eg. a knight will move 3 instead of 5
    }

    Defines.EController controllerType; //same string to use as in controllerType in game settings.
    ArrayList<EAblility> abilities;

}

EAblility: All AI can have any of these traits and engine will work based on this
- UPGRADE_TECHS, // invents upgrades for the units (eg. heavy knigt for knights)
- PROP_CHG_TECHS, // invents propery changer techs that affect this unit (eg. blacksmith techs)
- GRANT_THE_ALL_TECHS, // on game create the AI player will get the default "all techs"
- USE_UPGRADE_UNITS, //if given than it will train units that needs to be bought in upgrades section.
- AI_SILLY_MOVEMENT, // means AI uits will not move that far as they could eg. a knight will move 3 instead of 5


Current setting of AI-s (in code, not from file):
AI1:
AiDifficulty.EAblility.UPGRADE_TECHS
AiDifficulty.EAblility.GRANT_THE_ALL_TECHS
AiDifficulty.EAblility.PROP_CHG_TECHS
AiDifficulty.EAblility.USE_UPGRADE_UNITS

AI2:
AiDifficulty.EAblility.AI_SILLY_MOVEMENT
Post Reply

Return to “Ao* Engine Knowledge base”