This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-08-04 09:41:29

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Autonomous "Robot" Battles

Been thinking about an open challenge where people download a sprite (so everyone has the same) and then script it in such a way that when two peoples individual sprites are loaded into the same game, they battle to the death without any additional human input.

Clearly there would have to be rules/standards about how much damage they do/recieve, and all variables would have to be sprite-specific.

Anyone have any ideas about how we could set this up?


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#2 2007-08-04 10:24:56

mdusoe
Scratcher
Registered: 2007-06-14
Posts: 32

Re: Autonomous "Robot" Battles

wow, that's a really good idea! 

At first blush, I could see making the game control the action, and each sprite just responds to messages like <When I receive DoNextTurn>  or <When I Receive Initialize>.

I have to go, but I LOVE that idea, and would interested in helping, if you'd like.

Mike.

Offline

 

#3 2007-08-04 11:15:17

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Re: Autonomous "Robot" Battles

I had a similar idea - I wanted my pupils to design a car or plane or boat (or anything really) and then import it into a project, run the the simulation and see what the outcome was.

(A non-violent version of your idea :-) )

Maybe just start off your project by making simple bots that can start off at bottom left or top right and try to find each other.

Then add a prod sticking out on each one at the front and see if the sprites can make the prod hit a vunerable part of the other one (make vunerable spots a unique colour).

The introduce differnet types of "prod" that inflict different damage.  Damage slows down ability of sprite to move/turn. 

The max movement/turning per turn should be governed by the size of the bot - just decide some rules (50x50 - max movement 20, max direction change 45 degrees - 100x100 - max movement 10, max direction change 20 degrees - just examples)

Each player would have to build these rules into their bot.

Just ideas

regards

Simon

Offline

 

#4 2007-08-04 11:33:44

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Autonomous "Robot" Battles

The interesting thing is that all detection would have to be by colour sensing, which would be a challenge.  THink I'd probably make a square arena with different coloured walls, though, so the bot could tell where it was when it reached a wall.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#5 2007-08-04 16:25:25

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Autonomous "Robot" Battles

OK:  Contest is go!  Rules are here:

http://scratch.mit.edu/forums/viewtopic.php?pid=5192#p5192


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#6 2007-08-04 17:33:57

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Re: Autonomous "Robot" Battles

Started trying out a few things - came across a helpful debugging method

I put

Wait <mouse y/100> secs

in my loop

this lets you vary the speed of the action - makes it easy to make things fast until robots are approaching a descision and then slow to see what happens.

Just brain-storming at the moment - I think the sprite being hit needs to signal that its been hit in a vunerable place -  the stage could run a master control script (MCS) that decides what to do. 

So if sprite detects another sprite collision - broadcasts this - all bots temp halt- MCS issues a check collision to all bots - all bots do a damage assesment (they could have both run into each others prods) then they all carry on.

Maybe better for MCS to issue "next move broadcasts" - then each sprite moves - checks for collision with other bot - broadcasts hit - etc etc
regards
Simon

Offline

 

#7 2007-08-05 07:21:45

Llamalover
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: Autonomous "Robot" Battles

That's just like RoboCode! You can download it at http://robocode.sourceforge.net/


Be nice, I'm an old lady  wink

Offline

 

Board footer