Saturday, 25 November 2017
2.3 Fuzzy Logic & Decision Tree's
Fuzzy Logic & Decision Tree's
Now the use of the fuzzy logic algorithm as been explained in my previous blog (Using AI in Computer Games - Assignment 1, 4.2 Fuzzy Logic) So I will include my first section from that post "where the state membership has a float range and not made up of 0 and 1's, what I mean by this is the state is a number between the 0 and 1, so for example 0.5. You're probably thinking, what does this mean? Well to make it simpler, in a shooting game the AI as well as the player character will have a health bar, below is an example of Fuzzy logic...
Now the algorithm fuzzy logic is not used in my game, although the act of attacking and then death is part of my game, I do not intend to put in the technique of fuzzy logic. If I was to apply fuzzy logic to my game then the zombie AI is where I would apply it to, why? Well because as you can see from my image above that fuzzy logic is used to portray that of a health bar, by assigning this algorithm to the AI it will give the zombies a life span. In my game the player character is helpless and cannot damage the zombie AI so applying fuzzy logic to the zombies would be pointless, but a technique such as this is used in almost if not all shooter games today.
Now I just mentioned fuzzy logic is used in most shooter games, but also used in other genre's too.
Now you are probably wondering why I have uploaded a screenshot from the popular game franchise FIFA, well in the bottom left corner you can see a small green bar under the players (AI's) name. This is a stamina bar which is a player rating used to measure how far the AI can run before it gets tired, when the game starts the green stamina bar will have a rating of 100, as the game goes on the player with become more tired resulting in the bar to reduce. This is a perfect example of a fuzzy logic health bar in action, this will deteriorate quicker the lower the stamina rating or in a shooter, the higher the damage rating.
Decision tree's on the other hand (Using AI in Computer Games - Assignment 1, 4.4 Decision Tree) as mentioned in my previous blog are basically yes or no questions, it's the action of questions that an IA will ask its self depending on its surroundings, current state and health stature... A typical decision tree line of questioning in a shooter game such as Call of Duty for an AI would be:
Have I taken any damage? -> Yes -> find a place to hide until healthy -> Do I now have full health? -> No -> continue hiding until healthy -> Do I now have full health? -> Yes -> Return to the battle scene.
So where could this fit into my game if I wish to apply the decision tree algorithm? Well as the player character enters the room, the AI state of attack could go like this:
Has the player character entered room B -> No -> continue on patrol between the two points in the room.
or
Has the player character entered room B -> Yes -> Attack player character.
So has a decision tree been used in today's games? Of course, it's used all a majority of games including AI today. It gives the AI its own decision path, own brain so to say, well it doesn't give them the option to make their own path and options but from the options its given and based on the questions asked the AI can make its next move. The AI characters in Call of Duty would use the decision tree when under attack from the player character or even other AI:
Have I taken any damage? -> Yes -> find a place to hide until healthy -> Do I now have full health? -> No -> continue hiding until healthy -> Do I now have full health? -> Yes -> Return to the battle scene.
Decision tree's in games are used to give the AI that new leaf on life, when all is at its darkest, the AI can find recovery and return to action. So in away the decision tree will be used in my game as long as it is kept very basic, it will be a simple one question for the AI from the example above and then the game will start over.
Subscribe to:
Post Comments (Atom)
Introduction to: NWC603COM – Using AI in Computer Games Assignment 2
Introduction to: NWC603COM – Using AI in Computer Games Assignment 2 Artificial intelligence (AI) in the gaming world today has become t...
-
References (1) Company Facts, Unity - Game Engine, 2017, https://unity3d.com/public-relations (2) W Gallear, AI and Games , Waynes HE ...
-
Algorithm So where will the algorithm element fit into my game? Well I now have my game planned out as you can see in 1.1 Game Idea , the...
-
Q-Learning & Artificial Neural Networks An Artificial Neural Network in gaming AI ( Using AI in Computer Games - Assignment 1, 5.2 Le...

No comments:
Post a Comment