Week 2 - Adversarial search and constraint satisfaction Flashcards

(17 cards)

1
Q

What is an adversarial search

A

Search where there are 2 agents with conflicting goals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is minimax

A

Minimax is used in two-player adversarial games where one agent (Max) tries to maximize the score, and the other (Min) tries to minimize it. Each player assumes the opponent will always make the most punishing move possible. Therefore, Minimax chooses the best possible outcome assuming the worst-case scenario from the opponent, i.e., Max selects the move that gives the maximum of the minimum scores resulting from Min’s optimal response, and vice versa.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what does minimax algorithm do

A

the minimax algorithm selects the best outcome of the worst case scenarios as opposing player plays optimally to hurt you

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

properties of minimax algorithm

A

MINIMAX EXPLORES GAMETREE IN DFS

time complexity - O (b^d)
space complexity - O(b * d)

complete - IF TREE IS FINITE
optimal - IF OPPOSING PLAYER IS PLAYING OPTIMALLY

NOT EFFICIENT - WE CAN USE ALPHABETA PRUNING TO SKIP PATHS WE KNOW WONT LEAD TO ANSWER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what are the 3 main components of CSP

A

. finite set of variables
. set of domains ( set of values that can be assigned to each variable)
. constraints

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

why are csp solvers different from searches

A

so reason csp solving is different from searches

is that we dont care about the sequence of actions that take us to the goal state

we only care about finding a goal state given that constrainst are satisfied under the solution (assigment of variables to values in domain)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

why faster to use csp solvers than somehtign like an informed search

A

so reason csp solving is different from searches

is that we dont care about the sequence of actions that take us to the goal state

we only care about finding a goal state given that constrainst are satisfied under the solution (assigment of variables to values in domain)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is a csp solution

A

an instantion of ALL variables to values in the domain such that ALL constrainsts are satisfied

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

READ

A

csp solvers explore PARTIAL ASSIGNENTS that have to be consistent ( follow constrainsts)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

solving a csp ( how it works)

A

States: assignments of variables to values within domains

Initial state: no variables

Action: assign a value to an unassigned variable if it doesn’t violate a constraint, if no legal assignments then failure

goal test: all variables assigned (value in domain) and constraints satisfied

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

why is complete search tree so ineffiecnt

A

searches all possible assignments of n from domain size m

n ! x m^n

We can make this more effeicent by backtracking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why does incorporating backtracking in a complete search tree make it more effient

A

backtracking:
each level is assigning a specific variable :
we assign a variable a value
if failure we backtrack to next assignment
if all assignments ( im assuming for that variable ) fail then failure

reduce now to m ^n

( before was n! x m^n with complete search tree)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How can we make a search tree that incoporates backtracking even more efficient know

A

. choose how we select the next variable to assign carefully
. choose value to select in smarter order
. Detect failures early ( through forward checking or constraint propogation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

choosing how we select the next variable to assign carefully

A

. Most constrained variable
- choose variable with the fewest legal
moves [MRV heuristic ] - minimum
remaining values

. most constraining variable
-choose variable that imposes the most
constraints on the remaining variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

choosing the value we select ( in a smart order)

A

choose the least constraining value
- value that leaves remaining variable
with the most legal moves
(rules out fewest)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Detecting failure early (forward checking)

A

Propoogate information from a variable we assigned to an unassigned variable

keep track of legal moves for remaining variables at each iteration we assign a variable

TERMINATES EARLY WHEN an unassigned variable has no remaining legal values

17
Q

Detecting failure early (constraint propogation)

A

Constraint propagation enforces constraints and detects failure even earlier than forward checking
Uses the arc consistency algorithm which makes sure pairs of variables that affect each other are consistent
X → Y is consistent if for each value of X there are allowed values of Y
When checking X → Y throw out any values of X where there wouldn’t be an allowed value for Y
If X loses a value then we must check every pair again
Can be run before or after a variable assigment