Академический Документы
Профессиональный Документы
Культура Документы
Hw-1
Bharath
Doddadunnasandra
Narayana
Reddy
Graph
search
b.
The
Minimax
says
the
maximizer
should
take
column
3
to
get
its
maximum
value
3.
(Russel
and
Norvig,
Exercise
3.3)
Two
friends
Problem
a.
State:
PosiXon
of
friends
a
and
b,
P(pa,pb)
and
the
acXon
taken
by
each:
A
(a,b)
Ini(al
state:
Player
a
and
Player
b
at
two
dierent
ciXes
starXng
simultaneously
Ac(on:
at
each
turn
both
the
players
move
to
a
neighboring
city
Terminal
test:
whether
pa=pb
Path
Cost:
maximum
Xme
taken
by
either
friend
to
travel
from
Time
from
city
max(d(pa1,pa2)
,
d(pb1,pb2)
)
b.
A
heurisXc
is
admissible
when
it
does
not
overesXmate
the
actual
path
cost.
D(i,j)
and
D(i,j)/2
are
admissible
as
the
path
cost
is
not
overesXmated.
whereas
2D(i,j)
is
not
admissible
as
it
overesXmates
the
cost
of
reaching
the
goal.
c.
Consider
a
map
of
two
posiXons
connected
by
a
single
link.
When
the
two
friends
start
over,
they
move
to
the
other
city
in
the
next
turn.
So
at
each
turn
they
end
staying
at
opposite
ciXes.
This
will
become
an
innite
loop
with
no
soluXons.
d.
Adding
a
loop
to
one
of
the
two
states
in
the
two-node
single
link
graph,
when
both
the
friends
start,
they
reach
the
same
city
in
just
one
step.
But,
one
of
the
friends
will
visit
the
same
city
twice.
4.
A:
when
playing
opXmally
MIN
always
chooses
the
minimum
values.
B:
when
playing
subopXmally
MIN
chooses
a
value
greater
than
the
minimum
values
available.
C:
MAX
will
always
be
the
root
node,
which
always
chooses
the
maximum
of
the
available
values.
Hence,
from
B
it
is
inferred
that,
MAX
always
gets
to
choose
a
greater
value
while
MIN
plays
subopXmally,
compared
to
when
MIN
plays
opXmally.
b)
As
it
can
be
seen
from
the
trees
in
the
adjacent
gure,
that
MAX
sXll
does
beaer
when
it
plays
subopXmally
against
a
subopXmal
MIN.
5.
a)
adjacent
diagram
b)
whenever
a
player
is
given
a
chance
to
choose
between
a
win
and
a
?,
the
player
always
goes
for
the
win
rather
than
staying
in
the
?
or
limbo
state
c)
As
MiniMax
uses
depth
rst
search,
it
keeps
repeaXng
the
already
visited
states
and
might
enter
a
loop,
that
would
fail
the
algorithm.
As
seen
in
the
gure
of
two-players
game,
for
a
game
with
four
posiXons,
we
have
two
repeated
states
in
the
tree.
If
we
apply
the
answer
b
we
can
avoid
the
repeated
states
and
hence
avoid
the
innite
loop.
d)Whenever
n
is
even,
A
always
is
ahead
of
B
and
has
a
chance
of
going
forward
or
backward
of
B.
This
will
prevent
B
from
Winning
in
a
even
n
board.
Hence
A
always
has
a
winning
chance.
Whereas
in
odd
n
board
game,
B
will
have
the
advantage
which
A
had
in
even
n
board
game.