The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

AI Difficulty levels

  • Filter
  • Time
  • Show
Clear All
new posts

  • AI Difficulty levels

    I was wondering how can I go about creating AI difficulty levels.

    I can think about it in a standard FSM approach where we have the object hold a state variable, and then some value for difficulty, or just combine the two into one variable, and increase the values on the enum,

    but I only want to have states for the actual states (Hunting, traveling, etc), but that doesn't broach the difficulty. would I still put a case switch inside the state functions for the difficulty (I can see these getting to be rather long case switches), or should I just create a HuntingEasy, travelingHard, etc...

  • #2
    there's some variable called 'Skill' or something like that which is related to the difficulty level, and is inserted into most of the functions involved in a bot's decision making process (if you're using UTBot, which seems so)


    • #3
      Hi, Personally I do it by nerfing the AI . When you write you AI it's perfect to start off with ( perfect aim , instant reactions , picks the perfect path to get somewhere ) to make it easier and possibly more human you need to introduce artifical errors to your AI. The greater the error , the easier the AI is to defeat. I personally add inaccuracy to the aim target , randomly ignore the seePlayer / enemy events , delay changing targets etc.

      I basically have a skill int in the defaultproperties for the pawn and in postBeginPlay use that to calculate the variables that really affect aim , reactions etc. That way you have a simple variable to change and the error factors for each thing are only calculated once instead of each time you fire , move etc.

      Other things to consider are the skill level of the weapon your AI has ( make it fire slower , misfire , reload slower , do less damage ) and also the health and speed of the Pawn. Again the controller owns all these so easy to set in your AI code.

      I extend from GameAIController so don't know about the built in methods in UDK / UT AI controllers

      Hope this helps



      • #4
        that is very interesting insanerob. while reading I got maybe like an impression of an inverse modulus running around , but i'm pretty sure those values are floats. I can think that these changes would be effective to do in a FPS, but I was going for an RTS where balanced abilities (accuracy, health, misfiring) are a requirement. though the major changes would be in actual logic (I think I might include the part about the seek target times, and maybe a little of ignore seeEnemy events).

        I know I can set the difficulty in the AITeamController extension, and then have it propagate to all members of the teams, and set the TeamController by a menu selection, or Kvalue.

        thanks insanerob. don't go crazy though.