1 / 28

An Overview of Game Theory

An Overview of Game Theory. by Kian Mirjalali. What kind of game is mentioned in our discussion?. There are two players A and B . Assume that A always starts the game (for convenience only). In each turn, one of them plays and the turns are alternative.

knut
Télécharger la présentation

An Overview of Game Theory

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. An Overview ofGame Theory by Kian Mirjalali

  2. What kind of game is mentioned in our discussion? • There are two players A and B. • Assume that A always starts the game (for convenience only). • In each turn, one of them plays and the turns are alternative. • A and B are opponents (They play against each other).

  3. Usual properties of our games: • The game is finite. • There is no factor of randomization (such as dice or coin). • The loser is the one who cannot move anymore. • We assume these properties to be true unless otherwise specified.

  4. What we are usually supposed to do: • Predict who is the winner (according to the initial state of the game). • Give a winning strategy for the winner. • Helpful assumption : • The players are very clever and do their best moves to win the game.

  5. Some simple games • GRAFGAME.EXE • A famous Game of stones: • There are n stones. • Each player has to take off k stones in his turn, which 1≤ k ≤ r (for some predefined value of r).

  6. Who is the winner in the second game? • Let’s solve it for r=1. • Obvious result: • If n is even then B wins. • If n is odd then A wins. • No strategy is needed for winning!

  7. Solution for the second game (continue): • How about r=2 ? • Let’s make a winner table: • Result: • B wins if and only if n is a multiple of 3.

  8. Solution for the second game (continue): • What about the strategy? • If n is a multiple of 3, then the winning strategy for B, is to make the number of stones, dividable by 3, after A’s moves. • If n is not a multiple of 3, then the winning strategy for A, is to make the number of stones, dividable by 3, in the first move, and then acting just like B in a 3∣n game.

  9. General Solution for the second game: • A similar rule holds for larger values of r: • B wins if and only if n is a multiple of r+1.

  10. General Solution for the second game: • And a similar strategy can be used for winning: • If n is a multiple of r+1, then the winning strategy for B, is to make the number of stones dividable by r+1 again after A’s moves. • If n is not a multiple of r+1, then the winning strategy for A, is to make the number of stones dividable by r+1 in the first move, and then acting just like B in a (r+1)∣n game.

  11. State Graph • Place a vertex for each state. • Connect vertex u to vertex v with a directed edge, if and only if the game can go from the state equivalent to u, to the state equivalent to v, in a single move.

  12. An Example of State Graph • An example of state graph for the latter game is below (for n=9 and r=3):

  13. Using state graphs to find the winners: • We apply the method for the example above (n=9 and r=3). • Starting with the vertices of final states and going up backward while finding the winners. B A A A B A A A B A

  14. General method to find the winners: v A • Consider the available moves in the state of vertex v: • If there was an edge leading to a B-marked vertex: • mark v with A. • Otherwise: • mark v with B. A A B ? ? ? v B A A A A A A

  15. Special notes • The state graph is a DAG, in finite games. (why?) • We can mark the vertices of this DAG (with A or B) in the reverse order of its topological sorting. • There is a single source equivalent to the initial state of the game. Its label shows the winner of the main game.

  16. Special notes (continue) • The method of marking the vertices is just like a dynamic algorithm. • We can use the memoized method to mark the vertices (just like any other dynamic algorithm). • We can use the state graph also in order to obtain a winning strategy.

  17. Special notes (continue) • The winner always moves from an A-marked vertex state to a B-marked one. • The loser always has no way but moving from a B-marked vertex state to an A-marked one.

  18. Special notes (continue) • In the final states (which are sinks in the DAG) B-marked vertices are losing states and A-marked vertices are winning states. • The memoized algorithm works just like a post-order traversal.

  19. An important problem • What should we do if the number of the states is too many to be stored in memory? • Examples : • Chess • Reversi • Checkers

  20. An important problem (continue) • The answer is just the answer to the same problem in dynamic algorithms: • We have to use Back-Tracking. • We have to sacrifice time for memory.

  21. More problems • What if Back-Tracking was a too slow algorithm due to the number of the states?

  22. More problems (answer) • It’s in this moment when all hope for a fast deterministic algorithm has faded. • We can no longer go as deep as the vertices of final states. • We have to use a new method. Not always leading to win but doing nearly the best moves in each turn.

  23. A new method • We don’t put A and B labels on vertices any more. Instead, we assign a real value to each vertex. • It’s something like probability to win the game. The more this value is, the more it’s probable for us to win the game. • A winning state vertex is assigned the value of +∞ (and vise versa).

  24. A new method (continue) • We start the Back-Tracking just like a simple one, but as we reach an appropriate depth (not too shallow resulting in bad moves and not too deep resulting in long runtimes), we stop going down and use a heuristic function to evaluate the assigned value to the current vertex.

  25. A new method (continue) • The better the heuristic function works, the better the algorithm selects its moves. • The value assigned to upper vertices is specified according to these two principles: • Our player tries to maximize the assigned value. • The opponent tries to minimize it.

  26. A new method (continue) • An optimization method: • α-β-pruning. • It’s mentioned in DA courses.

  27. Bye Bye sentences • It was just an overview of the game theory. • You can see many interesting puzzles about games. You can deal with them much better now. • Writing programs playing games is an enjoyable job. • Start it right now (of course after the DA seminars): select a famous game and write its program. You won’t regret that!

  28. An open problem: Find a good heuristic function for the game of life.

More Related