boolean games
TRANSCRIPT
1vs.
Boolean Gamesturn based, one on one0
Exercise 51
Players take turns
Exercise 51
Players take turns4 connected win
Exercise 51
Players take turns4 connected win
Exercise 51
have Fun
Players take turns4 connected win
Exercise 51
10
10
10
10
10
10
0 starts
10
10
10
10
10
10 00 starts
10
10
10
10
10
10 0
1 starts
0 starts
10
10
10
10
10
10 0
10
10
10 11 starts
0 starts
10
10
10
10
10
10 0
10
10
10 1
10
10
10 101 starts
0 starts
Task: construct a set of Horn clauses that describe if a player has already won or lost.
10
10
10
10
10
10 0
10
10
10 1
10
10
10 101 starts
0 starts
10
10
10
10
10
10 0
10
10
10 1
10
10
10 101 starts
0 starts 0
10
10
10
10
10
10 0
10
10
10 1
10
10
10 101 starts
0 starts 0
0
10
10
10
10
10
10 1
10
10
10 10
1 starts
0
10
10
10
10
10
10 1
10
10
10 10
1 starts
0
10
10
10
10
10
10 1
10
10
10 10
1 starts
0
10
10
10
10
10
10 1
10
10
10 10
1 starts
0
How can we generalize?
10
10
10
10
10
10 1
10
10
10 100
10
10
10
10
10
10 1
10
10
10 100
10
10
10
10
10
10 1
10
10
10 100
if a draw is not possible
0000111000100011000011100000110001110000111000000110001000011000110000110000011000001000110000001000001110000001110001000110000111000001100011100001110000001100010000110001100001100000110000010001100000010000011100000011100010001100001110000011000111000011100010001100010000110001100001100000110000010001100000010000011100000011100010001100001110000011000111000011100000011000100001100011000011000001100000100011000000100000111000000111000100011000011100000110001110000111000000110001000011000110000110000011000001000110000001000001110000001110001000110000111000001100011100001110000001100010000110001100001100100011000001000110000200100000111000000111000100011000011100000110001110000111000000110001000011000110000110000011000001000110000001000001110000001110001000110000111000001100011100001110000001100010000110001100001100000110000010001100000010
“Any Boolean function leads to a Game ...”
Donald E. Knuth
Exercise 52
construct game graph
animate
x2
start
construct game graph
animate
x2
x1
start
construct game graph
animate
x2
x1
x4
start
construct game graph
animate
x2
x3 x5 x7
x6 x8
x9x1
x4
start
x1 x3 x5 x7
x6x4 x8
x9
1
some example steps- max 4 possible moves-
start
x1 x3 x5 x7
x6 x8
x9
1 0
some example steps- max 4 possible moves-
start
x1 x5 x7
x6 x8
x9
1 0
1
some example steps- max 4 possible moves-
start
x1 x5 x7
x6 x8
x9
0
1
0
some example steps- max 4 possible moves-
start
x1
x2
x1
x2(a) f(x[1:n]) = x[1:n] < x[n:1]╓
╙╓╙
x1
x2
xx
(a) f(x[1:n]) = x[1:n] < x[n:1]╓╙
╓╙
x1
x2
xx
x0
x1
(a) f(x[1:n]) = x[1:n] < x[n:1]╓╙
╓╙
x1
x2
xx
x0
x1
00
10
01
11
(a) f(x[1:n]) = x[1:n] < x[n:1]╓╙
╓╙
x1
x2
xx
x0
x1
0
0
0
1
(a) f(x[1:n]) = x[1:n] < x[n:1]╓╙
╓╙
x1
x2
xx
x1
0
0
0
1
0
(a) f(x[1:n]) = x[1:n] < x[n:1]╓╙
╓╙
Algorithm C
n (a)2 0 wins3 0 wins4 first wins5 second wins6 second wins7 1 loses if first8 draw9 draw
(a) f(x[1:n]) = x[1:n] < x[n:1]╓╙
╓╙
n (b)2 second wins3 first wins4 first wins5 draw6 second wins7 second wins8 draw9 draw
(b) f(x[1:n]) = xi⊕i
n (c)2 1 wins3 first wins4 first wins5 draw6 1 loses if first7 1 loses if first8 draw9 draw
(c) f(x[1:n]) = x[1:n] contains no two consecutive 1’s
╓╙ ╓
╙
n (d)2 second wins3 first wins4 first wins5 1 loses if first6 1 loses if first7 1 loses if first8 1 loses if first9 1 loses if first
(d) f(x[1:n]) = (x[1:n])2 is prime╓╙
╓╙
Questions?