Artificial Intelligence In: Gaming

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

Artificial Intelligence

in Gaming 🎮

Applying Behaviour characterstic to decision


making process to create believable game AI

Name: Aditya Payal Section: K21RS


Roll No: A14 Course : INT404
Table of contents

1 Introduction
2 Application of AI in Gaming
3 Purposed Methodology
4 Future Work
5 Conclusion
6 References
Introduction
AI has come a long way in recent years, and its impact on the
gaming industry has been significant. From virtual assistants and
chatbots to sophisticated in-game opponents, AI is transforming
the way we play and interact with games. From classic board
games to the latest virtual reality experiences. With AI, games
can be more immersive, challenging, and dynamic, and can
provide players with new opportunities for creativity and social
interaction.
Application of AI in Gaming

NPCs Pathfinding
These are characters in the Pathfinding involves getting
game who act intelligently as from one point to another.
if they were controlled by
human players.
Decision
Making Cheat Detection
Decision-making is all Analyze the patterns of
about the capability of a players movementes and
character to decide on its keys to detect if user is
next action. cheating or not.
What are NPCs?
NPC are characters within a computer game that are controlled by the computer, rather
than a player. It mainly used to imitate human like characteristics, enhance gameplay and
improve user experience. In most current games, opponents are pre-programmed NPCs;
however, AI is on the path to adding intelligence to these characters. This will make them
less predictable and more enjoyable to play against.
There are many types of NPCs in games, including:
● Quest givers: NPCs that provide the player with quests or missions to complete in order
to progress through the game.
● Merchants: NPCs that sell items or equipment to the player, often in exchange for in-
game currency.
● Enemies: NPCs that attack the player, often as part of combat encounters.
● Allies: NPCs that assist the player in combat or provide other types of support.
● Background characters: NPCs that populate the game world but have no direct
interaction with the player.
Purposed Methodolgy
Decision Making System
The Decision-making system is an essential component in any in-game AI. Such systems
provide NPCs with an ability to choose an option amongst possible ones and allows to
describe a behavior. NPCs can use the provided ability to find a particular object in a
game world or to make a decision about something.
During the game process the characters adapt to changes of the environment state by
receiving new behavior logic from the Temporal Roles. In addition, all the decisions
made by the characters are affected by an individual set of each agent Behavior
characteristics.
Decision Tree
Algorithm
The decision tree algorithm is a popular machine
learning algorithm used for classification and
regression problems. It builds a tree-like model of
decisions and their possible consequences. The tree is
constructed by recursively splitting the data into
smaller subsets based on the most significant variables
or features.

In a decision tree, the root node represents the initial


decision, and the internal nodes represent the
intermediate decisions based on the input data or
attributes. The branches represent the possible
outcomes or decisions that follow each decision node.
The leaf nodes represent the final outcomes or
decisions based on the input data.
Finite State Machine
It add a notion of state to the character, and then make
decisions a function of both the current conditions and
the character’s current state.

● A finite state machine (FSM) can be modeled as a


directed graph, where each node of the graph
corresponds to a state, and each directed edge
corresponds to a event, that triggers a change of
state and optionally some associated action.
Alpha Beta Puring
The algorithm can be used to quickly evaluate the possible options and find the optimal
decision by reducing the number of options that need to be evaluated.
It is an extension of the minimax algorithm that reduces the number of nodes that need to be
evaluated by the minimax algorithm.

The idea behind alpha-beta pruning is that, at any point during the search, if we can determine
that a particular node will not affect the final outcome, we can stop evaluating the subtree
rooted at that node. This is done by using the alpha and beta values to keep track of the best
score that has been found so far for the maximizing and minimizing player, respectively. If we
encounter a node that is guaranteed to produce a worse score than the current best score, we
can stop evaluating the subtree rooted at that node, since it cannot affect the final outcome.
Algorithm
1. Start at the root node of the game tree.
2. Set alpha to negative infinity and beta to positive infinity.
3. Evaluate the current node.
4. If the current node is a leaf node, return the node's score.
5. If the current node is a maximizing node, set the current
best score to negative infinity.
6. If the current node is a minimizing node, set the current
best score to positive infinity.
7. For each child of the current node: a. Recursively evaluate
the child node using steps 2-7. b. If the child node's score
is better than the current best score (for maximizing
nodes) or worse than the current best score (for
minimizing nodes), update the current best score. c. If the
child node's score is better than the current alpha (for
maximizing nodes) or worse than the current beta (for
minimizing nodes), update alpha or beta accordingly. d. If
beta <= alpha, break out of the loop (i.e., prune the
remaining children).
8. Return the current best score.
Conclusion
The decision-making model presented in this paper provides a way to create complex
behavior rules for the game characters controlled by an artificial intelligence. With the help
of these rules, it becomes possible to generate a characters with a believable behavior that
meets modern requirements for a game artificial intelligence.

To achieve the believability, the model uses a combination of the Behavior roles and
Behavior Characteristics components. They allow characters to bring more individuality into
their decisions and adapt their behavior according to the state of a game environment. In turn,
generating unique sets of Behavior Characteristics solves the problem of creating a big
number of agents with a diverse and realistic behavior to inhabit huge game world
Future Work
To reach more believability of characters’ behavior the developed model
can be complemented by the machine learning methods to bring more
diversity into an agent behavior or to modify their decision-making cycle to
adapt to the changes in a game state or a player in-game progress. In
addition, the model may be coupled by the methods of procedural
generation to bring more effectiveness to the generation of characters’
personalities or to develop an approach to automatically inhabit game
settlements by agents with an artificial intelligence.

All of these current and potential future applications of AI in gaming seem


fascinating, but it’s hard to say how far AI can go and impact the future of
the gaming industry. However, looking at how far artificial intelligence has
come in gaming, it is evident that AI will continue to evolve and generate
more diverse gaming experiences and environments for players.
References
● Gomes P, Paiva A, Martinho C, Jhala A. Metrics for Character Believability
in Interactive Narrative In proceedings ICIDS 2013. 2013.
● Eccles V, Dissertation BA. Procedurally Generated Background Characters.
2017AUTHOR (YEAR).
● Graham R. An introduction to utility theory. Game AI Pro 2014;2:327–342.
● Russell SJ, Norvig P. Artificial intelligence: a modern approach. Malaysia;
Pearson Education Limited,; 2016
● Searle J. The Chinese Room Argument. Encycl. Cogn. Sci., Chichester:
John Wiley & Sons, Ltd; 2006.
● Unreal Engine 4 n.d. https://www.unrealengine.com.
● Unity n.d. https://unity.com/ (accessed April 23, 2019).
● Yannakakis GN, Togelius J. Artificial intelligence and games. vol. 2.
Springer; 2018.
THANK
YOU

You might also like