GOKULKANNANMMECLECTC
239 views
81 slides
Jun 20, 2024
Slide 1 of 81
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
About This Presentation
BASIC CONCEPTS OF GAME THEORY
Size: 2 MB
Language: en
Added: Jun 20, 2024
Slides: 81 pages
Slide Content
UNIT-III
GAME PLAYING AND CSP
TOPICS
•Game theory
•Optimal decisions in games
•Alpha-beta search
•Monte-carlotree search
•Stochastic games
•Partially observable games
•Constraint satisfaction problems
•Constraint propagation
•Backtracking search for CSP
•Local search for CSP
•Structure of CSP
Game theory
•GamePlayingisanimportantdomainofartificial
intelligence.Gamesdon’trequiremuchknowledge;
theonlyknowledgeweneedtoprovideistherules,
legalmovesandtheconditionsofwinningorlosing
thegame.
•Gametheory,branchofappliedmathematicsthat
providestoolsforanalyzingsituationsinwhich
parties,calledplayers,makedecisionsthatare
interdependent.Thisinterdependencecauseseach
playertoconsidertheotherplayer’spossible
decisions,orstrategies,informulatingstrategy.
•Competitiveenvironments,inwhichtheagent’s
goalsareinconflict,giverisetoadversarialsearch
problems–oftenknownasgames.
Formal Definition of Game
•Consider games with two players, whom we will call
MAX and MIN. MAX moves first, and then they take
turns moving until the game is over. At the end of the
game, points are awarded to the winning player and
penalties are given to the loser.
•A game can be formally defined as a kind of search
problem with the following elements:
ALPHA–BETA PRUNING
•Alpha beta pruning is a modified version of the
minimaxalgorithm
•It is an optimization technique for the minimax
algorithm
•Alpha beta pruning is the pruning(cutting down) of
useless branches in decision trees
•Alpha-highest value
–Initial Value α=-∞
•Max player will only update the value of alpha
•Beta –lowest value
–Initial Value α=+∞
•Min player will only update the value of alpha
•Condition : α>=β
•Selection:Inthisprocess,theMCTSalgorithmtraverses
thecurrenttreefromtherootnodeusingaspecific
strategy.Thestrategyusesanevaluationfunctionto
optimallyselectnodeswiththehighestestimatedvalue.
•Itreturnsthemaximumvalue
•Expansion:In this process, a new child node is added to
the tree to that node which was optimally reached
during the selection process.
•Example problem: Map coloring
VariablesWA, NT, Q, NSW, V, SA, T
DomainsD
i= {red,green,blue}
Constraints: adjacent regions must have different
colors
e.g., WA ≠NT, or (WA,NT) in
{(red,green),(red,blue),(green,red),
(green,blue),(blue,red),(blue,green)}
Constraint graph
•Binary CSP:each constraint relates two variables
•Constraint graph:nodes are variables, arcs are
constraints
Variations on the CSP formalism
•The simplest kind of CSP involves variables that have
discrete and finite domains
1.Finite domains
•Map-coloring problems and scheduling with time
limits and 8-queens problem
2.Discrete domains
•discrete domain can be infinite, such as the set of
integers or strings.
•no longer possible to describe constraints
Typesofconstraints
•Unaryconstraintsinvolveasinglevariable,
–e.g.,SA≠green
•Binaryconstraintsinvolvepairsofvariables,
–e.g.,SA≠WA
•GlobalconstraintorHigher-orderconstraintsinvolve3or
morevariables,
–e.g.,cryptarithmeticcolumnconstraints
•Auxiliary variables representing the digit carried over into
the tens, hundreds, or thousands column. These
constraints can be represented in a constraint
hypergraphC10, C100, and C1000
5.Globalconstraints
•Aglobalconstraintisoneinvolvinganarbitrary
numberofvariables
•Globalconstraintsoccurfrequentlyinrealproblems
andcanbehandledbyspecial-purposealgorithms
thataremoreefficientthanthegeneral-purpose
methods
•The Alldiffconstraint says that all the variables
involved must have distinct values
•Ex: cryptarithmeticproblem and Sudoku puzzles
Improving backtracking efficiency
•General-purposemethods can give huge gains
in speed:
–Which variable should be assigned next?
–In what order should its values be tried?
–Can we detect inevitable failure early?
Most constrained variable
•Most constrained variable:
choose the variable with the fewest legal values
•a.k.a. minimum remaining values (MRV)
heuristic
Most constraining variable
•A good idea is to use it as a tie-breaker among
most constrained variables
•Most constraining variable:
–choose the variable with the most constraints on
remaining variables
–
Least constraining value
•Given a variable to assign, choose the least
constraining value:
–the one that rules out the fewest values in the
remaining variables
–
•Combining these heuristics makes 1000
queens feasible
Forward checking
•Idea:
–Keep track of remaining legal values for unassigned variables
–Terminate search when any variable has no legal values
–
Forward checking
•Idea:
–Keep track of remaining legal values for unassigned variables
–Terminate search when any variable has no legal values
–
Forward checking
•Idea:
–Keep track of remaining legal values for unassigned variables
–Terminate search when any variable has no legal values
–
Forward checking
•Idea:
–Keep track of remaining legal values for unassigned variables
–Terminate search when any variable has no legal values
–
LocalsearchforCSP
•theinitialstateassignsavaluetoeveryvariable,and
thesearchchangesthevalueofonevariableata
time.Forexample,inthe8-queensproblemor4
queensproblem
•eachstepmovesasinglequeentoanewpositionin
itscolumn
•new value for a variable, the most obvious heuristic
is to select the value that results in the minimum
number of conflicts with other variables—the min-
conflicts
4 queens problem
•States:4queensin4columns(4
4
=256states)
•Actions:movequeenincolumn
•Goaltest:noattacks
•Evaluation:h(n)=numberofattacks