1 / 13

Games

Games. CSE 473 – Autumn 2003. Alpha-Beta Pruning. Alpha-Beta MiniMax. MinVal(state, alpha, beta){ if (terminal(state)) return utility(state); for (s in children(state)){ child = MaxVal(s,alpha,beta); beta = min(beta,child); if (alpha>=beta) return child; } return beta;

lyncha
Download Presentation

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. Games CSE 473 – Autumn 2003

  2. Alpha-Beta Pruning

  3. Alpha-Beta MiniMax MinVal(state, alpha, beta){ if (terminal(state)) return utility(state); for (s in children(state)){ child = MaxVal(s,alpha,beta); beta = min(beta,child); if (alpha>=beta) return child; } return beta; } alpha = highest value choice along any path for MAX beta = lowest value choice along any choice for min

  4. Alpha-Beta MiniMax MaxVal(state, alpha, beta){ if (terminal(state)) return utility(state); for (s in children(state)){ child = MinVal(s,alpha,beta); alpha = max(alpha,child); if (alpha>=beta) return child; } return alpha; } alpha = highest value choice along any path for MAX beta = lowest value choice along any choice for min

  5. Alpha-Beta Pruning (1) call MaxVal(B,10,…) (3) alpha=20 (2) MinVal(C1…) returns 20 (6) beta=15alpha=20alpha>=beta true!immediately return to B B (4) call MinVal(C2,20,…) pruned (5) call MaxVal(D,20,…) returns 15

  6. Effect of Alpha-Beta Pruning • Best case: reduces number of nodes searched from O(bd) to O(bd/2) • Can double depth of search • Using good static evaluation function to order children gets close to best case in practice

  7. Evaluation Functions eval(s) = w1 * material(s) + w2 * mobility(s) + w3 * king safety(s) + w4 * center control(s) + ... • In practice MiniMax improves accuracy of heuristic eval function • But one can construct pathological games where more search hurts performance! (Nau 1981)

  8. Learning Weights

  9. Learning New Features Search for common patterns • Logistello (Buro 1997)

  10. End-Game Databases • Ken Thompson – all 5 piece end-games • Lewis Stiller – all 6 piece end-games • Refuted common chess wisdom: many positions thought to be ties were forced wins – 90% for white! • Is perfect chess a win for white?

  11. The MONSTER White wins in 255 moves (Stiller, 1991)

  12. Kasparov vs. Deep Blue • IBM team led by JC Tan • 32 RISC processors + 256 VLSI chess engines • 200 million positions per second • 16 plies Deep Blue wins - 1997(3 wins, 1 loss, 2 draws) Kasparov Speaks!

  13. Kasparov vs. Deep Junior • Israeli programmers Amir Ban & Shay Bushinsky • 2M positions/sec • 8 CPU, 8 GB RAM Win2000 • 15 plies • Strongest program ever! • Buy it for $100! Deep Junior – August 2, 2003Match ends in a 3 / 3 tie!

More Related