Discuss and collaborate on GML scripts

You are not logged in.

#1 2013-07-31 11:41:20

Registered: 2009-05-21
Posts: 74

Robot AI Arena contest

I did not really know here to post this. But here's an idea I really wanted to do for a long time : a Robot AI Arena Contest where every entrant is responsible to code its own Robot's AI considering regulations.

The idea is simple, let everyone program their own AI. However, Robots would be customizable : some would be faster, some would be heavier and stronger, and could have more weapons attached to them, some could have special skills, etc. But they all would need to follow well designed rules.

For example, I would seperate robots in differents parts :

Just like a tank the head does not have to face the moving direction. Lighter weapons could be attached to this part.

Holds the speed and general armor of the robot. Heavier weapons coud be attached to this part, but the weapons would have to aim at the moving directions.

All weapons would have predefined caracteristics such as : laser, missiles, etc. but they could only be attached to specific bodies or heads.

The Arena
In order for people to be able to code their AI, the areana would be the same during all fights. It would also contains node in order to navigate through the arena.

Usage of functions and scripts
A set of scripts would be available to participants so all they are allowed to use is Game Maker functions in their AI robot object.

Of course those are guidelines I have written really fast but overall the set of rules would need to be made. I think it would be very interesting to see two AIs fight against each other and make a tournament out of this.

What do you guys think? Would you be interested in participating?


#2 2013-07-31 13:29:51

Registered: 2008-12-11
Posts: 303

Re: Robot AI Arena contest

Quickly some things before My mind crashes from lack of proper sleep. sorry if some of it sounds weird. tired

You need to provide the mech/robot or tank template with the basic feature (hard point attachement and firering) and only provide an entry point for the code, like a blank DoStep(). and have strict access like you imply to components that are attached through a specific API same for the targets available in the game. because if people are allowed to play in the core stuff, like even do a instance_nearest and you have rules that they cant see though walls or know where the target is in certain circumstances....

Same for the path system you need to have that handled by an api. so that the contestant cant simply do a mp_path towards a target without following the rules.

here is what I would have as components

1)line sensors. (aka collision_line first). the line sensor finds detect all objects in the arena, walls, pickups, other robots, bullets, missiles, rockets and waypoints nodes at a range of 400, can rotate up to 15 degrees a second

2)cannon, fires a bullet every 5 seconds at a range of 200, 100 bullets, 10pt damage

3)missile, fires a missile every 10 seconds at a range of 400, 3 missiles, 25 pt damage, 10 health

4)rocket fires a 3 rockets every 5 second at a range of 300, 15 rockets, 10 pt damage each, 10 health

5)Anti missile (shaff) (6 on board)

6) Gun. 1 damage, 100 distance, unlimited, 4 bullets a second

The robot body
The body has 8 attachment points to attach components

The head has 4 attach points

Only the sensors can be used to navigate the field. or find objects to travel to or attack

Waypoints for the room are always 300 pixels apart and have a 32x32 sprite for sensor detection

Walls are 64x64 sprites

The AI can have a memory of up to 100 items?

Navigation and targeting can only be done through the sensors

Last edited by icuurd12b42 (2013-07-31 13:33:18)


#3 2013-07-31 13:51:49

Registered: 2009-05-21
Posts: 74

Re: Robot AI Arena contest

That is exactly what I had in mind. Obviously I wrote that pretty fast so I did not have time to deliver anything concrete yet, but everything you described is exactly what I thought about doing.

Would you be interested into developping this with me?


#4 2013-07-31 15:55:01

Registered: 2009-05-21
Posts: 74

Re: Robot AI Arena contest

Here's an example of what I thought about doing when first defining your robots parts :

Script : robot_define_head( type )

Expandswitch( argument0 ) {
    case HEAD_LIGHT:
        head_attach_points = 2; //Two attach points available on a light head
        head_attach_point_x[0] = 10;
        head_attach_point_y[0] = 10;

For movements :

Script : robot_move( forward )

Expandvar newPosX = x + lengthdir_x( robot_speed, robot_direction ) * (argument0 - !argument0);
var newPosY = y + lengthdir_y( robot_speed, robot_direction ) * (argument0 - !argument0);
if ( !place_meeting( newPosX, newPosY, par_solid ) ) {
    x = newPosX;
    y = newPosY;

And so on... I really want to put the emphasis on the diverse solution to create an AI that will compete with yours. That means you would need to anticipate and so on. The set of scripts would be there to act as an API as you said so the entrant can follow rules easily.

I don't think that letting the user use built-in auto-generated paths functions would be a problem. Imo it wouldn't even be that good at all.

EDIT : Although I like the line sensor idea where it would force the users to make their robots move around to search for the other robots. As if he was scanning the map but once the scan reaches a wall, it can't see beyond it.

Last edited by Marchal_Mig12 (2013-07-31 15:58:22)


#5 2013-07-31 21:35:18

Registered: 2009-05-21
Posts: 74

Re: Robot AI Arena contest

Here's a little something I made really quick : … Arena.html


Board footer

Powered by FluxBB