Programming Resources
For Fun and Learning
Charles Cusack
Computer Science
Hope College
main

Python
C++
JAVA
PHP
SQL

Assignments


LemkeGame


Description

Lemke Game

Move Rule: If a vertex has 2 or more pebbles on it, you may move a pebble from it to any adjacent vertex, but you must discard another pebble from that vertex.

Goal: Move a pebble onto a special vertex called the root.

The Game:

  1. Player 1: Choose any number of pebbles (call it X) to give to player 2.
  2. Player 2: Place the pebbles wherever you want and pick a root. You want it to be impossible to move a pebble to the root.
  3. Player 1: If you can move a pebble to the root, you get 16-X points. Otherwise, Player 2 gets X points.
  4. Swap players and repeat.
  5. The player with the most points after the two rounds wins.


Lemke Game 2

Place as few pebbles as possible anywhere on the graph you want so that it is possible to move a pebble to any vertex. Whoever can do it with the least number of pebbles wins.