Mühle-Agent

Mühle Agent Preview

Description

What is “Mühle”?

“Mühle” is a turn-based board game in which two players face off against each other and try to eliminate the opposing pieces until only two are left. The first player receives the white pieces and can start, while the second player gets the black pieces, respectively.

  • Setup phase: The players take turns placing down nine of their pieces on any free crossing or corner.
  • Move phase: Pieces can be moved over the marked lines, if the next crossing or corner isn’t already occupied. Whenever three pieces are in line horizontally or vertically, a mill has been created. Now that player can remove one piece of the opponent.
  • End phase: If a player has only three pieces left, they are not restricted to moving only in single steps on the board, but can instead jump around to any free spot.
  • Win phase: The player loses, if they have just 2 pieces left.
  • Extra notes: When creating two mills at the same time, only one piece can be taken. A piece normally cannot be taken out of an existing mill, but if all pieces are part of mills, this rule does not apply anymore.

What can this software do?

Inside the program, you can play Mühle in the player vs. player or the player vs. computer game mode. The games will always be saved after each step (not in browser).

How does the software work?

The Software has been written in the programming language Rust and uses the module ggez for the UI.

  • UI: Through the draw function in ggez, we can simulate drag-and-drop functionality by saving a “carry piece” whenever the mouse button is pressed down and emptying it after release of the mouse button.

  • Engine: For now, the logic of the game engine is not made for performance, but instead to function properly. More on the data structure and logic is in the GitHub repo READ.ME

  • Computer player: The computer is made for calculating quickly and efficiently, which is being done by … (to be continued) …