Presentation is loading. Please wait.

Presentation is loading. Please wait.

Games and AI.

Similar presentations


Presentation on theme: "Games and AI."— Presentation transcript:

1 Games and AI

2 History or Why games anyway?

3 Games and Puzzles Checkers Chess Missionaries and Cannibals
Monkey and Bananas Go

4 Game types Two player – zero sum
With full knowledge (e.g. Tic-Tac-Toe) Partial Knowledge (e.g. Poker) Video games Military games Negotiation games

5 AI in Games How to implement decision making

6 Decision Making Internal State Decision Logic Action External State

7 Decision Trees Build a tree of choices Node types: Boolean Enumeration
Numeric value (values in ranges) 3D vectors (e.g distances)

8 Good for structured decisions
Can reduce complexity since not all conditions are checked Depth of tree is limit on performance O(log n), but worst case is O(n) Works directly on elementary data

9 State Machines Adds simple memory Input is perception of situation
Used to record the current action/situation Input is perception of situation Issue: a perception can be a complex combination of elementary data

10 Hierarchical State Machines
Two extensions: For design State machines can be combined into a single machine - just like programs Separation can be used for structuring For exception handling Emergency procedures called like a subroutine

11 Combining Decision Tree and State Machines
Use decision tree to collapse raw data to perception

12 Fuzzy Logic Classical Predicates are boolean Fuzzy Predicates
Hungry(Bob) Fuzzy Predicates Hungry(Bob) = 0.9

13 Fuzzification Healthy Hurt 1 Input Value

14 Fuzzy Logic Combinators
Not A 1-mA A and B Min ( mA , mB ) A or B Max ( mA , mB )

15 Rules Define membership in a set by fuzzy logic
m(take action) = m(A) and m(B)

16 Defuzzification Use a threshold to get a boolean
Use set of thresholds for an enumeration Use highest value for overlapping sets Center of gravity

17 Center of Gravity

18 Markov Processes State is numerical value
State vector is a set of values. Transition is a matrix operation V’ = V x M Each move has a matrix

19 Example Sate vector gives the safety of 4 locations player can be in
When player takes an action, the safety changes

20 Goal-Oriented Behavior
Players can have a set of possible goals and a set of actions. When a goal is active, use a planner to select actions to achieve the goal

21 Rule-Based Systems If <conditions> then <action>
More about rules next week!

22 Summery Choices!


Download ppt "Games and AI."

Similar presentations


Ads by Google