Documentation

Atlas.TheoryOfComputation.code.GeographyGame

structure GeographyGame.Position (V : Type u_2) :
Type u_2

A position in Generalized Geography: the current vertex (whose owner is about to move) together with the set of already-visited vertices.

Instances For
    def GeographyGame.ValidMove {V : Type u_1} (G : Digraph V) (pos : Position V) (next : V) :

    next is a valid move from pos in G: there is an edge from the current vertex to next, and next has not been visited.

    Instances For
      def GeographyGame.makeMove {V : Type u_1} [DecidableEq V] (pos : Position V) (next : V) :

      Update a position by moving the token to next, marking it visited.

      Instances For
        def GeographyGame.IsStuck {V : Type u_1} (G : Digraph V) (pos : Position V) :

        A position is stuck if no valid move exists — the player to move loses.

        Instances For
          inductive GeographyGame.HasWinningStrategy {V : Type u_1} [DecidableEq V] (G : Digraph V) :
          Position VBoolProp

          The "has winning strategy" relation for Generalized Geography. HasWinningStrategy G pos b holds when the player whose turn it is (b = true for Player I, b = false for Player II) has a strategy to win from position pos:

          • Player I (true) wins by choosing some valid move leading to a position where Player II loses.
          • Player II (false) wins immediately if the position is stuck (Player I cannot move), or if every valid move by Player I leads to a Player-I-winning position.
          Instances For
            def GeographyGame.initPosition {V : Type u_1} (s : V) :

            The initial position of the game starting at vertex s, with s already visited.

            Instances For
              def GeographyGame.GG {V : Type u_1} [DecidableEq V] (G : Digraph V) (s : V) :

              Sipser, Lecture 19. The language GG = {⟨G, a⟩ | Player I has a forced win in Generalized Geography on G from a}. GG is PSPACE-complete.

              Instances For