Before we get started... ● Slides: ● Purpose of this talk ● Who are YOU!? ● Who we are – BlueLine Game.

Slides:



Advertisements
Similar presentations
Adversarial Search Chapter 6 Section 1 – 4. Types of Games.
Advertisements

Anthony Cozzie. Quite possibly the nerdiest activity in the world But actually more fun than human chess Zappa o alpha-beta searcher, with a lot of tricks.
Adversarial Search We have experience in search where we assume that we are the only intelligent being and we have explicit control over the “world”. Lets.
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
Games and adversarial search
CS 484 – Artificial Intelligence
Adversarial Search Chapter 6 Section 1 – 4.
Adversarial Search Chapter 5.
Adversarial Search: Game Playing Reading: Chapter next time.
Adversarial Search CSE 473 University of Washington.
MINIMAX SEARCH AND ALPHA- BETA PRUNING: PLAYER 1 VS. PLAYER 2.
The Implementation of Artificial Intelligence and Temporal Difference Learning Algorithms in a Computerized Chess Programme By James Mannion Computer Systems.
An Introduction to Artificial Intelligence Lecture VI: Adversarial Search (Games) Ramin Halavati In which we examine problems.
10/19/2004TCSS435A Isabelle Bichindaritz1 Game and Tree Searching.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Adversarial Search Board games. Games 2 player zero-sum games Utility values at end of game – equal and opposite Games that are easy to represent Chess.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.
Games with Chance Other Search Algorithms CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 3 Adapted from slides of Yoonsuck Choe.
Game Playing CSC361 AI CSC361: Game Playing.
Games and adversarial search
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6: Adversarial Search Fall 2008 Marco Valtorta.
Adversarial Search: Game Playing Reading: Chess paper.
double AlphaBeta(state, depth, alpha, beta) begin if depth
Games & Adversarial Search Chapter 6 Section 1 – 4.
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
Game Playing State-of-the-Art  Checkers: Chinook ended 40-year-reign of human world champion Marion Tinsley in Used an endgame database defining.
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
Adversarial Search CS30 David Kauchak Spring 2015 Some material borrowed from : Sara Owsley Sood and others.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
1 Computer Group Engineering Department University of Science and Culture S. H. Davarpanah
Mark Dunlop, Computer and Information Sciences, Strathclyde University 1 Algorithms & Complexity 5 Games Mark D Dunlop.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Instructor: Vincent Conitzer
Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
Games 1 Alpha-Beta Example [-∞, +∞] Range of possible values Do DF-search until first leaf.
Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.
Cilk Pousse James Process CS534. Overview Introduction to Pousse Searching Evaluation Function Move Ordering Conclusion.
Today’s Topics Playing Deterministic (no Dice, etc) Games –Mini-max –  -  pruning –ML and games? 1997: Computer Chess Player (IBM’s Deep Blue) Beat Human.
CSE373: Data Structures & Algorithms Lecture 23: Intro to Artificial Intelligence and Game Theory Based on slides adapted Luke Zettlemoyer, Dan Klein,
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Adversarial Search. Game playing u Multi-agent competitive environment u The most common games are deterministic, turn- taking, two-player, zero-sum game.
Game-playing AIs Part 2 CIS 391 Fall CSE Intro to AI 2 Games: Outline of Unit Part II  The Minimax Rule  Alpha-Beta Pruning  Game-playing.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Luca Weibel Honors Track: Competitive Programming & Problem Solving Partisan game theory.
ADVERSARIAL SEARCH Chapter 6 Section 1 – 4. OUTLINE Optimal decisions α-β pruning Imperfect, real-time decisions.
Understanding AI of 2 Player Games. Motivation Not much experience in AI (first AI project) and no specific interests/passion that I wanted to explore.
1 Chapter 6 Game Playing. 2 Chapter 6 Contents l Game Trees l Assumptions l Static evaluation functions l Searching game trees l Minimax l Bounded lookahead.
Artificial Intelligence AIMA §5: Adversarial Search
Instructor: Vincent Conitzer
CS Fall 2016 (Shavlik©), Lecture 11, Week 6
AI Strategies for Probabilistic Turn Based Games
Games & Adversarial Search
Games with Chance Other Search Algorithms
Games & Adversarial Search
Games & Adversarial Search
Games & Adversarial Search
Instructor: Vincent Conitzer
Minimax strategies, alpha beta pruning
Game Playing Fifth Lecture 2019/4/11.
Instructor: Vincent Conitzer
Games & Adversarial Search
Minimax strategies, alpha beta pruning
CS51A David Kauchak Spring 2019
Games & Adversarial Search
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Before we get started... ● Slides: ● Purpose of this talk ● Who are YOU!? ● Who we are – BlueLine Game Studios

Hive

TABLE OF CONTENTS ● In The Lab – Abstract Strategy Games, Minimax, Alpha-Beta, Killer Heuristic, OpenBGE, Measuring Complexity – 4x, Genetic Algorithms, MTAIF, Further Reading ● In The Wild ● Wrap Up

IN THE LAB

Abstract Strategy Games ● Decades of research – Chess, Checkers, Go, Tic-Tac-Toe ● Use AI Agents (Strategy Model) ● Bonus for AI vs AI – Find bugs and exploits – Evolve AI and analyze progress

Abstract Strategy Games: Minimax Algorithm ● This is the best ever. – Deep Blue – 12 Plies deep, +5 points for Blue ● Heuristic Evaluation Function (parameterized) ● [show how it works] ● Parameterize weights – 2 huge benefits... will see them later in the presentation

Abstract Strategy Games: Minimax Algorithm

● This is the best ever. – Deep Blue – 12 Plies deep, +5 points for Blue ● Heuristic Evaluation Function (parameterized) ● gif source: [wikipedia - cc by-sa 3.0 us]wikipedia – for more ● Parameterize weights – 2 huge benefits... will see them later in the presentation

Abstract Strategy Games: Minimax Optimizations ● Alpha-Beta Pruning [in action] ● Killer Heuristic – Optimization on Alpha-Beta – Configurable ● Variants on Minimax – Negamax (code cleanup for zero-sum games) – Maximin (for non-zero-sum games)

Abstract Strategy Games: Minimax Optimizations

● Alpha-Beta Pruning [wikipedia cc by-sa 3.0]wikipedia ● Killer Heuristic – Optimization on Alpha-Beta – Configurable ● Variants on Minimax – Negamax (code cleanup for zero-sum games) – Maximin (for non-zero-sum games)

OpenBGE (Open Board Game Engine) ● Save yourself some time! ● C#, XNA ● Well commented, poorly documented otherwise ● OpenBGE.org OpenBGE.org

Abstract Strategy Games: Measuring Complexity ● Branching Factor – 4 average in Tic-Tac-Toe (9 - move#) – average in Chess – ~198 max in Hive ● Board Size – 9 in Tic-Tac-Toe – 64 in Chess / Checkers (“Draughts”) – ~1,290 in Hive ● State-Space Complexity ● Game Tree Size

4x Games ● 4x = Explore, Expand, Exploit, Exterminate ● Civilization III, etc. ● Similar Heuristic Evaluation Function – Usually not worth looking into the future plies – Must be really good – Parameterize here too! ● Genetic Algorithms / evolution strategies – “Shattered Throne”

4x Games: MTAIF Multi-Tiered AI Framework ● Very useful in 4x, but also in other AI (eg: RTS) ● Different sub-systems with different AI Agents – General – Lieutenant – Sergeant / Private ● Advantages – Code clarity – Incremental improvement (swapping) – Performance ● not all systems each turn

4x Games: Further Reading ● “An Introduction to Genetic Algorithms” by Melanie Mitchell ● Checkmark Games' AI blog seriesblog series – “Shattered Throne” for Xbox 360 ● “AI Game Programming Wisdom 2” edited by Steve Rabin – Fireaxis re: Civ III – up to at least v4 by now

TABLE OF CONTENTS ● In The Lab ● In The Wild – Features to make AI fast, fun & realistic. Harsh realities learned while making Hive ● Wrap Up

IN THE WILD

Humans & Fun Factor ● Your game is usually not play-by-mail! ● Fast enough to be fun – Need timeouts – Limits on Branching Factor – Progress bars! – AI on a different thread from UI (*multithreading) – “move now” option. Often bad though.

Humans & Fun Factor ● Human enough to be fun – Small amounts of randomness ● Unstable sorts such as most QuickSorts (Hive) ● Programmed random/weighted openings in Hive – Don't fail in non-human ways ● Repeating, then un-doing a move ● Doing something any move that is visibly “stupid” even if the overall AI is good, will give a bad impression.

AI Configuration ● Not just good for Genetic Algorithms ● “Personalities” – Opening – Normal – balanced – Winning – go on the attack – Losing – switch to defensive – Can also be a tool for character development ● Infinite Configurability (even saving)

Warning! / Uwaga! / Försiktig! ● Make sure player is learning to be good at winning the game, not at beating the AI. ● Real world examples – Civ III “cheating” – Hive Spider slowness

Harsh Realities: Lessons learned from Hive ● Real hardware is a huge constraint – Xbox 360 == 7.5 year old hardware – Cut top 2 levels of AI (will be on PC/Mac/Linux) ● AI Estimation – Off by orders of magnitude in dev-time – Spent ~month killing all runtime allocations to avoid Xbox Garbage Collections – AI didn't make initial release – Was a free update 2.5 mo.'s later

TABLE OF CONTENTS ● In The Lab ● In The Wild ● Wrap Up – I'll make it fast so that you still ask questions... lunch approaches!

WRAP UP ● Download this whole presentation online! – ● Play Hive (soon Khet 2.0) to see this in action – ● Then check out the source code: –

QUESTIONS? ● If you have more questions later: – – –