"Robot" coding game.

Sage
Posts: 1,482
Joined: 2002.09
Post: #1
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.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #2
It'd be fun, but considering how far spread out people are, there is no chance to survive make your time.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #3
Yeah I wanna do this, kinda in the style of RoboWar?
It could be good, for great justice.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #4
This is what I work on, outside of my game:

[Image: Wandering.png]
[Image: Quadruped.png]

And a screenshot of the app:
[Image: PANSISim.png]

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.

Here's a video:
http://home.earthlink.net/~zakariya/files/Clumsy_2.mov

Just wanted to put in my 2 cents. I've put a lot of time into that app/framework.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #5
Its a shame it's got acceleration spelled wrong Rasp but otherwise thats incredibly impressive!
It definitly doesn't look like the kind of program someone could knock together in a week or two Smile

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).

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #6
The one we used for my class was written in Java. That's ready now if not too many people have grumbles about Java. (There's always Jython and JRuby)

If we wanted to write a new one, we could just run the robots as subprocesses and pipe the information to/from them. That way people could write their bots in any language they liked.

What do you guys think?

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Moderator
Posts: 682
Joined: 2002.11
Post: #7
I have grumbles about Java.

What if we went harcore RoboWar style and have everyone have limited "funds," and have a scripting language for the coding bit? (Lua, anyone? Blitzmax has a very easy Lua module.)

My web site - Games, music, Python stuff
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #8
Skorche Wrote:If we wanted to write a new one, we could just run the robots as subprocesses and pipe the information to/from them. That way people could write their bots in any language they liked.
That'd be ideal.

-Jon
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #9
We could even just take the 2005 ICFP contest directly if we want to use pipes:

http://icfpc.plt-scheme.org/
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #10
OneSadCookie Wrote:We could even just take the 2005 ICFP contest directly if we want to use pipes:

http://icfpc.plt-scheme.org/

Wow, that looks ridiculously complicated.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #11
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! Rasp

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. Wink He could provide the host environment though!
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #12
AnotherJake Wrote:Well, it's got `codeing' spelled wrong, and a couple of words missing an apostrophe but otherwise it is a very impressive idea! Rasp
LOL ok, I stand corrected. I've been doing lots of physics experiment reports and not enough coding Wink .

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.

Edit: http://www.hoult.org/bruce/icfp2005/
ooh, now I see why Keith mentioned the ICFP. Rasp
Congrat's OneSadCookie.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 682
Joined: 2002.11
Post: #13
Am I the only one who things that writing a special language just for this is kind of silly?

Why limit the lines?

My web site - Games, music, Python stuff
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #14
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.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Moderator
Posts: 592
Joined: 2002.12
Post: #15
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Contest Coding sealfin 1 1,912 Jun 8, 2013 09:46 AM
Last Post: sealfin