For my algorithm class, we spent a few weeks programming "robots" to play a simple game. The point of the game was to have your robot capture buildings by tracing a loop around uncaptured buildings. If some of the buildings in the loop were already captured by an enemy, you didn't get any. The catch was that your robot was only told about the the grid squares directly to the sides and front, as well as a "distance sensor" that would tell you about the nearest wall in directly in front of the robot.

My team's robot was the only robot that mapped the area out and did pathfinding. For the second competition we added the ability for the robot to verify what areas it had captured and cull them from it search. As you can imagine, our robot pretty much trounced the competition and all the robots from the last 3 years that they've done this.

Is anyone interested in having a iDG robot competition? I know there are some clever people around here that could make a pretty mean robot.

It uses an implementation of Rodney Brooks' subsumption architecture as a sort of layered "brain" network for locomotion, force feedback, obstacle detection, and simple path finding. I'm still working on it, and am building a real version (physical hardware) in which the brain, ultimately will run.

unknown Wrote:Its a shame it's got acceleration spelled wrong but otherwise thats incredibly impressive!
It definitly doesn't look like the kind of program someone could knock together in a week or two

I think a robot codeing contest could be fun, but someone would need to build a robot arena a robot VM we can program, I'd be happy to make a prototype (simple top down 2d type thing).

Well, it's got `codeing' spelled wrong, and a couple of words missing an apostrophe but otherwise it is a very impressive idea!

I like the piped environment idea. Against my better judgement I might consider entering a contest like this. But only if TomorrowPlusX isn't allowed to enter. He could provide the host environment though!

So, anyway I started on this this morning and i've got robots moving (in a straight line). I'm just going to start writing the language, My idea would be to have each robot's think function called in turn, which would execute 16 lines of code (or whatever the current standard for the game is), then they would all move shoot etc..

I'll make a simple asm style language first but if anyone knows of a way to make lua, ruby, Io or some more complete language execute only a set number of lines of code hooking that up to the robots would be interesting.

diordna Wrote:Am I the only one who things that writing a special language just for this is kind of silly?

Why limit the lines?

I completely agree. I want to create the best algorithm I can to do this. Not the best one that can be written in 30 lines of made up assembly language. That doesn't sound fun at all. If I were to do this again, I'd want to spend time making the algorithm good, not learning a new language or squeezing memory space.

If you guys want, I could write a dummy bot for the game we used in class that opens a pipe to a subprocess. That probably wouldn't take more than an hour to write. (Ewww, Java IO. *shudders*) Then there would be a runtime environment that is ready to go that could use any language.

Skorche Wrote:I completely agree. I want to create the best algorithm I can to do this. Not the best one that can be written in 30 lines of made up assembly language. That doesn't sound fun at all. If I were to do this again, I'd want to spend time making the algorithm good, not learning a new language or squeezing memory space.

It depends on what the aim of the contest is. If it is to simulate the programming of a robot with a very simple processor and limited memory then the code limits are entirely justifiable.

The sense of achievement at getting something like this working within such constraints is much greater then doing the same with unlimited resources.