Agnon Board Game in Perl SVG

Calculating hexagons is fun, right? Well, hand drawing them is no fun. There are several fun games based on hexagon boards and we wanted to make them on the CNC router. Here is the Agnon game board and rules, as well as the Perl script that created it for our CNC router.

This Perl script produces the SVG files. We use the SVG files and convert them to G-Code for the router. Though there are more elegant ways to create the SVG, this scrip works. Here is the code, sharing for educational purposes and because we enjoy the game itself!


Agnon is a game game that was popular in the 18th century and there is a reference to a copyright in 1780 by Adam Vaugeois. It has simple rules and complex strategy.

Agnon Alternate Names

  • Queen’s Guard
  • Royal Guard
  • Guard
  • Advance and Retreat
  • Tournament

Agnon Objective

The winner is the first person to surround their queen on the center (purple hex) with her 6 guards.

Agnon Game Setup

Queen is placed first on the outer ring. The opoosing queen is placed exactly opposite.

Players take turns placing their remaining counters, 1 at a time on the outer ring. Once all 6 guards have been placed, players take turns moving their pieces with the player who went second getting the first opportunity to move their peice.

Agnon Game Play

Counters may move to an adjacent vacant cell. Movement is only sideways or inwards, never away from the center. Only the queen may move into the center. Counters may not jump or pass other counters.

Capture is done by surrounding an opponent with 2 of your pieces. All 3 must be in the same ring. When captured, the enemy is returned to the outer ring in any empty cell on the next move. If a queen is captured, she can move to any vacant cell on the board. If you are captured, your entire next turn is used to relocate your piece to the outer ring.

You cannot move safely into a capture. Moving your piece between 2 enemy pieces results in a capture. Multiple captures are possible and the captured player must then take 1 turn to relocate each piece back to the outer ring. If a queen and guard are trapped at the same time, the queen must be relocated first.

A player forfeits if he surrounds the center with guards but does not have a queen located on the center square.

Perl Code to Create Hexagon Game Board, Agnon

Agnon SVG File

Here is the actual SVG file for the Agnon Game Board. You are free to use it for personal use, but please credit us with it’s creation.
Agnon Game Board

Custom Perl Programming

Of course, if you want something created in Perl or any of a variety of languages please contact us for custom programming

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.