1 / 21

More on Adversial Games

More on Adversial Games. Tic-Tac-Toe. Can do minimax And alpha-beta pruning And improved representation Can we use logical inference?   ¬. Logical approach. X( n ), O( n ) represent board position. O(1), X(5), O(6), X(9) X( n )  O( n )  full( n ) ¬ full( n )  empty( n ).

keely
Download Presentation

More on Adversial Games

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. More on Adversial Games

  2. Tic-Tac-Toe • Can do minimax • And alpha-beta pruning • And improved representation • Can we use logical inference?   ¬

  3. Logical approach • X(n), O(n) represent board position. • O(1), X(5), O(6), X(9) • X(n)  O(n)  full(n) • ¬ full(n)  empty(n)

  4. Some basic facts • ol(1,2,3), ol(4,5,6), ol(7,8,9) • ol(1,4,7), ol(2,5,8), ol(3,6,9) • ol(1,5,9), ol(3,5,7) • ol(a,b,c)  line(a,b,c), ol(a,b,c)  line(a,c,b), etc. for the permutations of a,b,c. • Hmm…permutations bad…

  5. How to move • empty(a)  goodMove(a)  move(a)

  6. What’s a good move? • Winning is good. • X(a)  X(b)  line(a,b,c)  win(c) • win(n)  goodMove(n)

  7. What’s a good move? • Blocking a win is good. • O(a)  O(b)  line(a,b,c)  block:win(c) • block:win(n)  goodMove(n)

  8. What’s a good move? • Forking/splitting is good • X(b)  X(c)  b≠c line(a,b,d)  line(a,c,e)  empty(d)  empty(d)  fork/split(c) • fork/split(n)  goodMove(n)

  9. What’s a good move? • Blocking forking/splitting is good • O(b)  O(c)  b≠c line(a,b,d)  line(a,c,e)  empty(d)  empty(d)  block:fork/split(c) • block:fork/split(n)  goodMove(n)

  10. What’s a good move? • Just moving somewhere is good (base facts). • goodMove(1), goodMove(2), goodMove(3), etc. • Remember: empty(a)  goodMove(a)  move(a)

  11. Questions… • How to order the inference application? • How to order the goodMove rule application? • How does this differ from minimax?

  12. Answers • Ordering inference application • Write Horn clauses, use Prolog application rules. • X(a)  O(a) full(a) • full(A) :- X(A). • full(A) :- Y(A). • Relatively simple backtracking (although lots of speedup tricks are used). • full(3)? If X(3), yes; else if Y(3), yes. • full(P)? If X(P). X(P)? X(0), … etc.

  13. Answers • Ordering good Rule application • Order doesn’t matter here: • full(A) :- X(A). • full(A) :- Y(A). • But does matter here: • move(A) :- empty(A), goodMove(A). • goodMove(1). • goodMove(A) :- win(A). • Just put them in the order you wish … but this may be hard to do.

  14. Relation to MiniMax? • In some ways, not much. • Can Utility measures give us information about good rule ordering?

  15. More on adversarial search • Alpha-beta pruning: good! • Recognizing repeated states: good! (for speed and space) • Recognizing equivalent states: good! (for speed and space)

  16. Can’t go very deep • Still, Deep Blue reached 14 plies routinely • Other heuristics helped

  17. What to do? • Evaluate intermediate positions if you can’t play the end-game out.

  18. Typical problems • Non-quiescent positions • Horizon effect • Lack of information

  19. Games of chance • Expected value of a choice. • Prob(choice)* Value(choice). • Extend Minimax to use expected value. • But … (averaging over claivorance) • A | [B | C] • B >> A, B >> C

  20. When weak methods don’t work • Use strong ones • Strong methods might apply across domains • Might want to do planning.

  21. Othe games? • What about, say, non-adversarial games (current AI in game research)? • Might want to do planning.

More Related