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

#1 2007-08-04 16:24:00

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

Autonomous Robot Battle Contest.

RULES UPDATES: 
8/5/07
Banned use of the Pen commands and limited use of movement commands
Modified costumes
Modified scripts - please download new "base robots". 
Robots now take damage if they leave the screen.
"Arena Walls" slightly modified.
****

http://scratch.mit.edu/projects/Mayhem/26927

Your challenge is to script a bot that when placed in an arena with another bot, will drain all its health before all of your bots health is drained.

Health is drained by the orange sensor touching the enemy bots yellow sensor.

Download the file, and rename "Playerbot" to your name and put your name in the "I belong to... "say" block.  Then write scripts for your bot that will enable it to hunt down the enemy bot whilst avoiding health loss.

Then rename the file with your name, and upload it to the robot battles gallery:

http://scratch.mit.edu/galleries/4313

You may continue to ammend the bot's script until I begin the first round of robot vs robot battles, (date to be arrannged), at which point I will randomly choose elimination match-ups, and import 2 of your sprites into a single project to see which one comes out on top in a "best of 3" match.

RULES:

The robot comes with three scripts and one variable (health), and two costumes.

You may not alter any of these, except to add your name to the initial say box.

No script that you create can interfere with the variable "Health" or with the running of the three initial scripts.

All scripts must be contained on the one sprite.

Only one entry per round.

*************

BLOCK USE

MOTION
You may only use:
MOVE [ ] STEPS
Step size (or the variable controlling it) must remain between 30 and -30 steps, inclusive.
TURN [ ] DEGREES (either direction)
IF ON EDGE, BOUNCE
and the three variables:  (X POSITION) (Y POSITION) (DIRECTION)

LOOKS, SOUND, PEN
You may not use any blocks from these menus.

CONTROL
You may use any of these, though any requiring user input would be pointless.
SPECIAL:  A "GREEN FLAG" block must be followed by a "WAIT 2 SECONDS" block.

SENSING
You may use any of these, EXCLUDING "RESET TIMER".
Note however that any requiring user input would be pointless, as would any requiring the name of the opposing sprite.

NUMBERS
You may use any of these

VARIABLES
You may use any of these, but any variable must be for "this sprite only"

******

Let me know if you think we need any other rules.

******

Practice-bot is there for you to test your design on.  He's not brilliantly smart, but should provide a sufficiently moving target for you to practice against.  If your Bot can't beat Practice-bot, you are not going to get very far!

Last edited by Mayhem (2007-08-05 10:40:07)


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 17:43:29

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

Re: Autonomous Robot Battle Contest.

How exactly are we going to win if we can't even alter the movement scripts (which don't work for the Playerbot)?

Offline

 

#3 2007-08-04 18:05:14

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

Re: Autonomous Robot Battle Contest.

Playerbot doesn't come with a movement script apart from the one that assigns it to a random empty space when you press Green flag.

Try copying the 4th script down from Practicebot to Playerbot and start modifying it :-)

@Mayhem

Practicebot seems to have have 2 health reduction scripts - is this a bug?

regards

Simon

Last edited by SimpleScratch (2007-08-04 18:31:13)

Offline

 

#4 2007-08-04 18:11:04

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

Re: Autonomous Robot Battle Contest.

@Mayhem

IMHO I think it would be a lot easier on the coding if the bots did not have a black edge to them - would you consider removing the black except for where strictly necessary e.g to join the outlying extremities to the main body

regards

Simon

Offline

 

#5 2007-08-04 18:34:03

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

Re: Autonomous Robot Battle Contest.

Me again :-)

When battle is finished its hard to tell which bot has won!
(not obvious which health score is which)

How about making a third costume that shows which bot had been drained.

regards

Simon

Offline

 

#6 2007-08-04 18:59:08

AngelEyra
Scratcher
Registered: 2007-07-19
Posts: 100+

Re: Autonomous Robot Battle Contest.

I want to play!

eyra


AngelEyra's . MyScratchR . Blog
Think with portals
Sorry, Companion Cube... I didn't mean to...

Offline

 

#7 2007-08-04 19:25:13

AngelEyra
Scratcher
Registered: 2007-07-19
Posts: 100+

Re: Autonomous Robot Battle Contest.

Yay! My robot can rarely be damaged  smile

http://scratch.mit.edu/projects/AngelEyra/26965

eyra

Last edited by AngelEyra (2007-08-04 19:27:28)


AngelEyra's . MyScratchR . Blog
Think with portals
Sorry, Companion Cube... I didn't mean to...

Offline

 

#8 2007-08-04 19:57:26

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

Re: Autonomous Robot Battle Contest.

1) S65 - see simplescratch's response.  Playerbot has no movement script, it is up to you to create one.  That's pretty much the essence of the competition, in fact.

2) If practicebot has two identical scripts, that is indeed a bug.

3) Vis the black outlines, I was planning to add black edging to the arena and make it a rule that all bots must be scripted to not allow black to pass through black, so they can't go off screen and can't pass through each others bodies.

I'll keep the colour-coding on the walls as well as a black border as it will give a bot some idea of where it is, possibly.

4) good idea about the costume, but to keep it even simpler I'll just hide the loser  smile


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

 

#9 2007-08-04 20:44:24

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

Re: Autonomous Robot Battle Contest.

Okay, here's my entry:

Entry

I use the pen object to make other robots confused (but my robot can usually detect it). Is that okay?

Offline

 

#10 2007-08-04 21:42:17

AngelEyra
Scratcher
Registered: 2007-07-19
Posts: 100+

Re: Autonomous Robot Battle Contest.

Oops! I misread the rules. Time to return to working  tongue

eyra


AngelEyra's . MyScratchR . Blog
Think with portals
Sorry, Companion Cube... I didn't mean to...

Offline

 

#11 2007-08-04 23:00:57

AngelEyra
Scratcher
Registered: 2007-07-19
Posts: 100+

Re: Autonomous Robot Battle Contest.

My entry

eyra


AngelEyra's . MyScratchR . Blog
Think with portals
Sorry, Companion Cube... I didn't mean to...

Offline

 

#12 2007-08-05 03:08:51

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

Re: Autonomous Robot Battle Contest.

Re 2)
"if 2 identical scripts - indeed a bug"  ???

I think something has been lost in translation. :-)

In the version I've downloaded, there are 2 health reduction scripts - one of which has a broadcast endbattle at end of loop - other doesn't.

Are you saying this is deliberate - if so - could you explain the need for the 2 scripts please :-)

3) Black outlines
I'll try to make a better case :-)

With the different coloured sectors and parts - you've made it possible to detect the relative angles of the bots to each other but the black boundary around all the parts of the bots just gets in the way of this detection and increase the coding complexity .

New suggestions
Start bots off further apart - preferably in mirror image positions and directions (with slight random element to prevent automatic knowledge of others position) so as to prevent any advantage in a tournament due to initial start position.

I also feel that movements/direction changes should be limited otherwise bots will be able to do completely unrealistic movements which would not make for good viewing :-)

I think that what you might need is a system of people being able to get their bots to you privately so you can decide whether you need to modify your rules - if people post their bots publicly long before closing date/time then I think others might "borrow" them :-)

regards

Simon

Offline

 

#13 2007-08-05 05:43:14

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

Re: Autonomous Robot Battle Contest.

I've ammended the base costumes and scripts to address some of SimpleScratch's concerns, so any players will need to download the scripts again.

Vis the public posting, I think what I may do is announce the entry cut-off, and from that point after 48 hours the competion will begin - during those 48 hours only minor script ammendments will be allowed.  So everyone will have a chance to see the competetion and ammend their scripts a little.

Ideally, it would be nice to have peopel email me the sprites directly, but I don't want to post my email address on a public forum.


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

 

#14 2007-08-05 08:58:59

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

Re: Autonomous Robot Battle Contest.

You could create a hotmail account and just use that for the tournament - (I'll set one up for you if you'd like to save you effort :-) )

Rule clarification is a lot better (I'd used point in direction myself - hadn't thought of not knowing opposition name :-( )

I still feel that being not restricting max movement will cause issues :-(

regards

Simon

Last edited by SimpleScratch (2007-08-05 11:15:19)

Offline

 

#15 2007-08-05 09:19:35

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

Re: Autonomous Robot Battle Contest.

I think I see where you are coming from.

Speed should be a maximum of 1/2 a body length, I reckon - so 30.

But bear in mind a robot moving faster than speed 10, say, will find it extremely difficult to actually score a hit, since its attack sensor will probabaly skip right over the top of the enemy's target zone in a single move.

Last edited by Mayhem (2007-08-05 09:43:01)


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

 

#16 2007-08-06 12:12:17

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

Re: Autonomous Robot Battle Contest.

Bot coding proceeding but I'm having a bit of trouble understanding the "colour xxx over yyy" block :-(

I've come to the conclusion that it means if any of the sprite's pixel of colour x is on top of (or underneath!) any pixel colour y of another sprite then result is true otherwise its false.

But am I right????

regards

Simon

Last edited by SimpleScratch (2007-08-06 14:42:45)

Offline

 

#17 2007-08-06 15:46:08

_Dragon_MC_
Scratcher
Registered: 2007-07-15
Posts: 12

Re: Autonomous Robot Battle Contest.

SimpleScratch wrote:

Bot coding proceeding but I'm having a bit of trouble understanding the "colour xxx over yyy" block :-(

I've come to the conclusion that it means if any of the sprite's pixel of colour x is on top of (or underneath!) any pixel colour y of another sprite then result is true otherwise its false.

But am I right????

regards

Simon

Yes, you're right.

By the way Mayhem, can we use "change x by " and "change y by " blocks? And if not, why?

Last edited by _Dragon_MC_ (2007-08-06 15:48:55)


Nine out of every two people don't understand fractions!

Offline

 

#18 2007-08-06 15:51:50

_Dragon_MC_
Scratcher
Registered: 2007-07-15
Posts: 12

Re: Autonomous Robot Battle Contest.

Aw man, why can't we make our bots play any sounds??


Nine out of every two people don't understand fractions!

Offline

 

#19 2007-08-06 18:02:12

pedroskivich
Scratcher
Registered: 2007-05-21
Posts: 72

Re: Autonomous Robot Battle Contest.

I made a bot that always tied practice bot.

Offline

 

#20 2007-08-07 00:55:59

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

Re: Autonomous Robot Battle Contest.

_Dragon_MC_ wrote:

By the way Mayhem, can we use "change x by " and "change y by " blocks? And if not, why?

No, because I want robots limited to moving forwards and backwards, and rotating, only.


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

 

#21 2007-08-07 17:06:56

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Autonomous Robot Battle Contest.

Wow this is a great idea, an AI programming tournament! The possibilities are endless. I have been thinking of how to make a bot that will never get hit by the pratice bot and I'll code it up if I get enough time on the computer. Also if you want to battle a certain bot you should check it's code and see if there are any programming flaws you can exploit.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#22 2007-08-08 01:00:50

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Autonomous Robot Battle Contest.

I looked a bit closer at the rules a I saw you don't allow distance to or point to target. I realize that it would take a bit longer for you to switch all  the targets but really without being able to gather any data on your opponent the best most people can do would be to make a bot that wonderers around aimlessly until it hits it's target. If you allowed distance to and point to blocks people could make their bots look like they are trying to hunt the other bot down instead of just wandering. So please loosen up the rules just a little bit  smile

PS: There might be other ways to judge robots. You could put the user in control of a little player who tries to shoot down the diffrent kinds of robots and the robot project with the most love it's wins.

Last edited by archmage (2007-08-08 02:33:55)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#23 2007-08-08 02:56:20

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

Re: Autonomous Robot Battle Contest.

although it seems hard at first - if you look at the PracticeBot script, you can see how a bot can find another one and turn towards it.

As a first step, try using the script from PracticeBot and modifying it so your bot can beat PracticeBot.

(Hint work out how to retreat when taking damage!)

regards

Simon

Offline

 

#24 2007-08-08 04:13:01

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

Re: Autonomous Robot Battle Contest.

Archmage - at short range there are ways for your bot to sense the enemy.  The intellignece of its patrol route when not sensing an enemy and its behavior when it does, are the programming challenges of the game.

Checking the code of a specific enemy and programming to exploit it may not be such a good tactic, as in the heats you may not battle that bot.

Last edited by Mayhem (2007-08-08 04:13:51)


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

 

#25 2007-08-08 15:55:37

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

Re: Autonomous Robot Battle Contest.

We have yet to have a robot submitted that meets the rules - although in fairness the first two were submitted before the rules were finalised.

Come on folks, lets have some more entries!


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

 

Board footer