The Euphoria Pixel Bot Project



"Can my Pixel Bot have a laser cannon to blow away my opponent ?"



The Pixel Bot Project evolved from a suggestion made on the Euphoria Mailing List that it might be fun to design software robots ( coded using the Euphoria language ) that could find their way round a maze from A to B.

To make the implementation of such an idea simple; it seemed like a good idea to use the monitor screen to display a map of the maze and let each robot occupy a single pixel; hence Pixel Bot's were born.

It was not long before the idea of pitting various Pixel Bot's head-to-head arose and, not long after, came the request, "Can my Pixel Bot have a laser cannon to blow away my opponent ?"

I've always had an interest in robotics and the whole idea of Pixel Bot's captured my imagination; hence all these pages dedicated to the Euphoria Pixel Bot Project.

Whether or not the Pixel Bot concept grows into a fully fledged competition remains to be seen ( there are problems with having to run the controlling program - the arena program - with the robots required defined within the program itself, ie, no dynamic loading of code as and when it is required ), however, the basic premise of the Pixel Bot Project gives Euphoria programmers the challenge to design Pixel Bot's for their own enjoyment or for competition.

It also gives newcomers to Euphoria something that they can focus on as a programming task which is essential if one wishes to learn any computer language; programmers have written Hello World programs in C, Visual Basic, Cobol, Fortran, Java, JavaScript and various other languages, but, without a reason to use the language for a real purpose it's very hard to learn a new language further and the impetus is lost.

The development of the Pixel Bot Project itself has taught me an awful lot about programming in Euphoria in a very short time; reading the manual is no substitute for practical experience. As a teaching system, the Pixel Bot Project is an ideal place to start. With the flexibility available in the arena program; it is possible to have Pixel Bot's that perform the task of simply navigating a maze to find their way from a starting point to an end point ( an excellent standalone project for an individual ) and, with the inclusion of multiple Pixel Bot's, races to the finish and all-out warfare scenarios are easily implemented.

I hope you will enjoy the Euphoria Pixel Bot Project as much as I do.


The Pixel Bot Project Documentation

The following documents explain the Pixel Bot Project ...

What's New in the Pixel Bot Project

Discover the latest developments and follow the history of the Pixel Bot Project.

The Pixel Bot Specification

This document explains the environment in which the Pixel Bot's live.

The Pixel Bot API Specification

This document describes the functions and procedures that a programmer can use to let a Pixel Bot find out about and influence its environment.

All Pixel Bot's must use these functions and procedures to interact with the arena program that controls the behaviour and interaction of the Pixel Bot's.

Although the number of functions and procedures is fairly restricted; they allow each Pixel Bot to determine where it can move to, they allow it to move and allow them to engage in laser attacks on each other ( if they wish ).

Beyond the use of the API; each programmer is free to develop the program that controls a Pixel Bot's functionality in any way they wish; an aggressive or passive Pixel Bot can be created and it can use Brute force and ignorance or could exhibit Artificial Intelligence behaviour, it can wander aimlessly or it can attempt to build up a map of its environment.

The API provides a mechanism for interfacing to the arena program and leaves the programmer free to concentrate on the design of the Pixel Bot.

An example Pixel Bot program

This is an example Pixel Bot program that demonstrates the general format for a Pixel Bot program and explains the various sections of the code required.

You are free to take this example program and use it as the basis of your own Pixel Bot design.

If you have trouble accessing the example Pixel Bot program by following the specified link; the program can be found at http://www.psynet.net/hippy/pixelbot.e

The Arena program

This is the program that actually implements the various arena scenarios and handles the processing of Pixel Bot programs within the arena.

The Arena program is a fully working program ( although some parts of the API are yet to be fully and properly implemented ) and can be used to test and use your Pixel Bot designs.

If you have trouble accessing the Arena Program by following the specified link; the program can be found at http://www.psynet.net/hippy/arena.ex

The Arena Maze Generator This small, utility program will generate mazes that are used by the Arena program when a maze scenario is required in the arena.

If you have trouble accessing the Arena Maze Generator by following the specified link; the program can be found at http://www.psynet.net/hippy/maze.e The Arena program graphical interface The Arena program does not update the screen to indicate what is going on in the Arena but tells a graphical interface program what is happening and lets it decide how the Arena and other object visualisations should occur.

This prototype graphical interface provides a simple view of the Arena and the objects within it ( including Pixel Bots ) by mapping each location of the Arena onto a single pixel on the screen.

The graphical interface has been separated out from the Arena program so that development on the graphical interface can be carried out independently to the development of the Arena and Pixel Bot programs; the Pixel Bot Graphical Interface API Specification describes how the Arena program interfaces with the graphical interface.

If you have trouble accessing the prototype Arena program graphical front end by following the specified link; the program can be found at http://www.psynet.net/hippy/frontend.e The Welcome / Option Setting Interface The Arena program itself does not handle the determination of various options that control its operation; this is provided by the Welcome / Option Setting Interface that is called by the arena program when it starts-up.

This interface provides a simple text-based Welcome screen where the various options that control the operation of the Arena program can be set. Chosen settings are saved between runs of the Arena program ( in the file ARENA.CFG ) so that settings do not have to be initialised whenever the program is run.

If you have trouble accessing the Welcome / Option Setting interface by following the specified link; the program can be found at http://www.psynet.net/hippy/welcome.e


Participating In The Pixel Bot Project

In order to join in with the Pixel Bot Project, even if it is just to see how the project progresses, or to design your own Pixel Bot's you will need to download a few files that will allow you to run the project environment ...

Euphoria 2.0 This is the Euphoria programming language package from Rapid Deployment System which is used to run the arena.ex program. Clicking on this link will take you to their site where you will be able to download the package.

arena111.zip This is the latest, complete Euphoria Pixel Bot Project Package ( for version 1.11 of the arena.ex program ) and includes the arena.ex, maze.e, frontend.e, welcome.e and pixelbot.e files in a single, compressed, .ZIP file.

It is recommended that you download this complete package as you will be sure to get the latest versions of all necessary files and the whole operation will require only one download; the size of the .ZIP file is considerably less than the individual files themselves.

You are able to download each file individually if you wish ...

arena.ex This is the Arena Program that is used to control the Pixel Bots in their environment.

maze.e This is the Maze Generator that is used to generate a maze when one is rewqired in the arena.

frontend.e This is a simple Graphical Interface that is used to represent the Pixel Bot world, the arena, on the monitor screen. The Arena Program and the Graphical Interface have been separated out to allow more complex Graphical Interfaces to be designed without having to modify the Arena Program itself.

welcome.e This is a simple Welcome / Option Setting screen that is run at start-up to allow the Arena program operation to be configured.

pixelbot.e This is a simple demonstration Pixel Bot that can be taken and used as the basis of your own Pixel Bot design.

arena.bat This is a simple MS-DOS batch file that will run the Arena program through Euphoria providing the Euphoria executable ( EX.EXE ) has been installed in either C:\EUPHORIA\BIN or the same directory where the Euphoria Pixel Bot Project files were installed.

pixelbot.gif This is a small and simple Graphical Image File ( GIF ) that can be included on your web pages to indicate that you are participating in the Euphoria Pixel Bot Project.

The GIF file should be copied to your own web server and a link should be created using the following format -

<a href='http://www.psynet.net/hippy/pixelbot.htm">'
<img src="pixelbot.gif" border=0>
</a>

The Euphoria 2.0 programming package is in the form of a .ZIP file that includes all the executables, utility programs and documentation for the Euphoria language. Whilst I would almost guarantee that the programs distributed are virus free; as with all downloaded files, it is recommended that you check them out with a reputable Virus Checker before running any of the executables.

The remainder of the files are all raw text files and are therefore extremely unlikely to be carrying any form of virus. It is however worthwhile taking a cursory glance into the files to check that they do not contain any suspicious code that looks like it may do damage to your hard disk or other parts of your system.

Running the Arena Program

You must make sure that the arena.ex, maze.e, frontend.e, welcome.e and pixelbot.e files are all installed in the same directory and that ex.exe is either installed in that directory, the directory in which it is installed ( usually C:\EUPHORIA\BIN ) is included in the PATH environment variable or the ex.exe program must be run by specifying its full path.

The Arena program is designed to run in DOS32 mode ( that is within an MS-DOS prompt window under Windows ) and should be executed, at the command line, using the following command ...

EX ARENA.EX

Version Control

The Arena program ( in conjunction with all the other associated programs ) has been designed to support run-time version control.

This means that Arena program will check, when it is run, that all the files that you have downloaded are compatible with each other.

If the programs are grossly incompatible with each other you will see compilation errors when you try and run the program, however, as the programs are designed to use intricate links to prevent the accidental use of global data in a Pixel Bot program ( which may not be what they first appear to be ) there is a good chance that the Arena program will run when the other programs are actually incompatible.

If this is the case then you will see one of two error messages ...

Arena Program ( arena.ex ) version X.XX

The version of the arena.ex program is out of
date and cannot be used with your program

You have downloaded a new version of the named program but have not downloaded a new version of arena.ex; this later version is required to run the Arena program.

Arena Program ( arena.ex ) version X.XX

Your program is out of date and cannot be
used with this version of the arena.ex program

You have downloaded a new version of arena.ex but have not downloaded a new version of the specified program; this later version of the program is required to run the Arena program.

If you are working on your own versions of the Graphical Interface or the Welcome / Options Settings programs you will need to keep a very close eye on the changes that are being made to the Arena program and the original ( downloadable ) Pixel Bot versions of those files so that your own programs remain compatible and still run. It is recommended that you do not start serious development on such alternative versions until the Arena program reaches a 2.XX release.

Changes to Pixel Bot programs should however be rare as changes will be made in a manner that allows earlier Pixel Bot designs to still work with the later, improved, Arena programs.

Should such a situation arise whereby a Pixel Bot program requires a change; the Arena program will produce a comprehensive report telling you exactly what you need to do to make it compatible with the later Arena program.


Hacking

Hacking has, over the recent years, gained a bad name.

This is because the term hacking has become associated with acts of computer sabotage and attempts to break into computer systems for nefarious or criminal purposes. This reputation has been spread by misinformed media reporting so most of the public now assume that all hackers are criminals or have a criminal intent. This is not true.

The origin of the term hacker comes from many years ago when the manufacturers of computer systems were loathe to provide details of the inner workings of their products which made it difficult for computer programmers to gain any insight into how they could use these systems to their best advantage or even improve upon their original design.

It was not long before programmers began disassembling parts of the computer operating systems to see how they worked and started hacking bits out and putting their own, better or different, code in its place.

None of this effort was put in to damage the original systems nor to gain any commercial reward but to disseminate knowledge that would aid other people who were using the same systems. A true hacker is not a criminal but someone who wishes to get in and find out how things work simply to improve their understanding.

In the spirit of true hacking; everyone is encouraged to examine the code that forms the Pixel Bot Project, ask questions about it, make suggestions on improvements and even change it.

However, you are not allowed to take any of the concepts, programs, documentation or anything that forms or relates to any part of the Pixel Bot Project ( or any derivative work thereof ) and use it as the basis for the development of any derived work that is to be sold for commercial gain; please see the Copyright and Trademarks section below.


Copyright and Trademarks

To protect the work that has gone into the development of The Euphoria Pixel Bot Project it has been necessary to protect the project by way of Copyright and Trademark assignments.

The intention is not to prevent anyone from participating in the Pixel Bot Project ( which is actively encouraged ) but to prevent the project from being developed commercially using ideas and concepts that I and other participants of the Pixel Bot Project have evolved without some form of recognition or reward.

These Copyright and Trademark restrictions will not affect anyone who wants to take part in the Pixel Bot Project purely for their own, and others, entertainment and enjoyment and I hope that participants will understand why such Copyright and Trademark assignments have been necessary; why should we have our fun and games ( and our hard work ) stolen for commercial profit ?

Copyright

All software, programs and documentation that forms part of The Euphoria Pixel Bot Project are covered by copyright.

Trademarks

The terms "Euphoria Pixel Bot" and "Pixel Bot" in both their singular and plural forms along with the terms "The Euphoria Pixel Bot Project" and "The Pixel Bot Project" are trademarks belonging to The Happy Hippy.





Associated Articles

  Euphoria



Sites to Visit

  Euphoria 2.0
  Rapid Deployment System



Site Navigation

  Home Page
  What's New
  Search
  Add Bookmark
  Have Your Say
  Guestbook



The Euphoria Pixel Bot Project TM © 2000-2003, The Happy Hippy


First published sometime before Thursday the 23rd of February, 2000
Last upload was on Tuesday the 23rd of September, 2003 at 19:28:32