/OshwdemMazes

It generates mazes for OSHWDEM's robot contest.

Primary LanguageC#GNU General Public License v3.0GPL-3.0

OSHWDEM Mazes

-Versión en español-

OpenSource Hardware Demonstration by Bricolabs Group is the most important barcamp of makers in Galicia. Since 2014, there are robot challenges and everybody is invited to participate.

Constructed maze

One of the contest is the Maze with robots. This program is intended to be the maze generator according to the specific rules of the contest. It is compiled and executed on the big screen just in the beginning of the competition and the real maze is configured with the walls as shown on the big screen.

Executing Maze Generator

The source code is published so that you can study and generate mazes in order to audit the program and practice with maze configurations similar to the competition ones.

Prepare the environment

You need a GNU/Linux distribution and Mono.NET runtime to execute the Maze Generator. Current version is fully tested with Debian.

Get the precompiled binary file from Github directory:

wget https://github.com/brico-labs/OshwdemMazes/raw/master/precompiled/MazeGenerator.exe

Maximize the terminal window to view all the maze on screen.

Run the Maze Generator

The precompiled binary is Mono.NET 4.5 compatible. Try to execute it with the command:

mono MazeGenerator.exe

If something was wrong with the command, you probably need the Mono runtime. Debian flavours provide a Mono package and it is easy to install:

sudo apt-get install mono-complete

See the official How to install Mono if you have another OS distro.

Note for Windoze and Osex users: it should work from a console. However, we do NOT offer support for privative operating systems.

Maze straightness

Since v1.3, there is a command line parameter to generate the maze with more straightened paths.

Maze size and goal location

Since 2024 revision, there is two new command line parameters to set the size of the maze and the goal location:


-h --help
    Shows this help

-s --straightforward
    Generates more straightness paths; float value (0.00 - 1.00), default is 0.50
	
-z --size
    Defines the size of the maze; two int values separated by a comma, default is 16,16

-c --cornergoal
    Indicate if the goal is in the upper right corner. default is false (goal in the center)

Maze straightness 0%-100%

This animation shows 6 mazes with 0.00, 0.20, 0.40. 0.60, 0.80 and 1.00 values used in the "-s" parameter.

Compile the Maze Generator

Source code includes a OshwdemMazes.sln file. Install MonoDevelop, open it and build the project. It generates a new binary under the bin folder.

To install MonoDevelop:

sudo apt-get install monodevelop

License

Version 3 of the GNU General Public License (GPLv3). See LICENSE.txt.

Extra commands

Command line forever!

Massive maze generation

Generate 10 mazes and save them in a file:

for T in $(seq 10) ; do echo "Thanks" | mono MazeGenerator.exe >> mazes.txt ; done

Show and save at the same time

Save the maze in a file at the moment of generation:

mono MazeGenerator.exe | tee -a mazes.txt

Issues

Bug reports or suggestions are welcome.