Artificell Intelligence in games

Discussion in 'Public Game Developers Forum' started by rexopaxdev, Oct 19, 2014.

  1. rexopaxdev

    rexopaxdev Active Member

    #1 rexopaxdev, Oct 19, 2014
    Last edited: Oct 19, 2014
    How do you design and implement your AI in your games?

    Do you have a special designmethod? Neural networks and alike?

    We try to make an AI that thinks like we do ourselves. Different steps in the thinking and then evalution of different alternatives. But our AI is always extremely hardcoded for the game that should use it.

    Right now we are making an AI that handles "zero - infinite" amount of Unitgroups. The AI should divide all its units into Unitgroups and assign tasks to them.

    For example the AI can have several different offensive tasks at the same time, just like a human can.

    Designing AI is often a nightmare. Some tough stuff hehe.

    We should add that we design strategy games.


    Rexopax Software
     
  2. Destined

    Destined Well-Known Member

    Aug 11, 2013
    1,063
    0
    0
    In strategy games sometimes people overthink AI. Sometimes "find closest target" is fine for a unit, or "find nearest building" etc.

    Some people try to implement very complex AI and it results in it not being fun. Players like when they can see a unit and know what it is going to try and do (thus giving them a chance to counter).
     
  3. OnlyJoe

    OnlyJoe Well-Known Member

    Sep 29, 2013
    114
    0
    0
    Auckland
    #3 OnlyJoe, Oct 19, 2014
    Last edited: Oct 19, 2014
    Most AI in games is still done as state machines, or behaviour trees. I think the main reason is that fuzzy logic alternatives become so complex so fast. And they are not always guaranteed to give the same output, or an output that seems real to human behaviour, plus it becomes very very hard to tweak it to make it act better. Like you could use genetic algorithms in say a FPS game, but you might find that the computer player becomes just too good, and will do very strange things like constantly spinning around on the spot to try and see a new target, or just constantly jumping while it does everything to avoid being shot. The issue is that the results are unpredictable, and the algorithm will take advantage of every tiny little thing that exists, bugs and all. Making the players act in very un-life-like ways.

    But if you are smart you might be able to add some fuzzy logic in parts of the AI, say the path finding, base on where the best cover is, and other units are etc. So units can position themselves in the best possible way. But the problem is the amount of training you would need to do, and then if you change any of the game logic that might effect this, you need to retrain all your networks again. Something that can take ages even using gpus.
     
  4. rexopaxdev

    rexopaxdev Active Member

    Yeah its easy to overthink AI. But many games with many units seem to move the units in a "one and one way". There don't seem to be any design to move many units as a group in a smart way. Units that cooperates makes for a better AI then units just moving separately one by one. My personal opinion.
    :)
     
  5. rexopaxdev

    rexopaxdev Active Member

    We are using that in our next game. We usually make the AI like this and then we testplay against it and identify its weaknesses and when it acts stupid. We then make specific code to handle these weaknesses and stupidities. So its all hardcoded.
     

Share This Page