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

#1 2012-04-23 13:20:47

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

AI Strategy Tournament: Rescheduled to June 1st

Hey guys, after helping make the Game Tree article on the Wiki, I decided to host this competition/tournament for all advanced Scratch coders. Basically, you need to code an AI to play a strategy game, and we pit them against each other until we have a dominating winner! Here are the current rules:

If you're interested, please tell me as soon as possible so that I can set up matches, etc. Please suggest good simple strategy games, too.

Note: We have sorta decided on playing PacMan, but we won't be starting until at least the 20th so that we can get the back-end and stuff working.

Last edited by Hardmath123 (2012-06-05 09:47:44)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#2 2012-04-23 13:46:43

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Aww, I was hoping for a Scratch AI Tournament.  tongue

Oh well, looks like an interesting competition. Can't wait to see the results!

You should probably mention what type of strategy game. Cause if they are going to fight against each other, they need a game to fight each other on.  smile

Offline

 

#3 2012-04-23 13:49:20

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

I really want to suggest Chess.  tongue  It's not simple, I'll admit; but you could always have a built-in library of functions for representing pieces, moving them, etc, that everyone's code could use.  smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#4 2012-04-23 13:52:25

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Darn, I'm very new at JavaScript so I doubt i'll be able to get anywhere  tongue
Good luck to all who will join!  smile


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#5 2012-04-23 14:05:49

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

just NOT chess
i'd take a solved game, maybe checkers or something

Offline

 

#6 2012-04-23 16:22:04

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

I might join, depending on the game.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#7 2012-04-23 16:24:18

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: AI Strategy Tournament: Rescheduled to June 1st

bobbybee wrote:

I might join, depending on the game.

Yep I've got to agree with this, I'd at least want to be playing a game I understand.


http://i.imgur.com/zeIZW.png

Offline

 

#8 2012-04-23 17:01:05

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Interesting! I'll consider entering depending on the competition time, my free time and what the puzzle is! I'm studying artificial intelligence as one of my university modules at the moment, though I can't say I'm amazingly good at it  tongue


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#9 2012-04-23 23:53:19

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Since nobody is really enthusiastic (or confident, whichever way you put it) about doing it on their own, how about we make 2 teams instead? Then slinger can join, too, AND I don't have to set up matches (which I personally find a very unfair way to host a tournament, since often I get stuck with the top players in the first rounds)!

Also, if I'm not mistaken, the current "maybe"s are:

blob8108
sparks
rookwood101
bobbybee
roijac

Hardmath123, if you think it would be fair. I'll release the "pit against" script publicly, so anyone can rerun the match on their own to double-check.

As far as the game goes, how about Hex? You play on a grid of tesselated hexagons, taking turns coloring hexagons red or blue depending on your team. Winner is the first person to get a continuous line of hexagons of his color from one edge of the board to the other.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#10 2012-04-24 08:49:21

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

hex?
sounds ok, how large's the board?

Offline

 

#11 2012-04-24 08:55:55

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

That sounds pretty interesting... There could be a lot of nice strategy programming to go with that!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#12 2012-04-24 09:14:58

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

@roijac: Traditionally, Hex is played on an 11x11 rhombus, but for the sake of computation speed, let's make it 10x10 (21 squares fewer to think of).

@sparks: Yep! In fact, it is known that following the perfect strategy, the winner must be the first player. The reason is a principle in Game Theory called "Strategy Stealing". If the first player (let's call him A) plays anywhere on the board, the move cannot possible hurt him, right? In fact, if anything, it will help him. Now the argument goes, if B (the opponent) had a perfect, fool proof way to win, A could move anywhere random on the first move, then play as if he were the second player. Keeping this in mind, we will have to host two matches for the 2 teams: switching between who goes first.

Anyone want to be a team captain? We need two, just to pick teams. I decided if we end up 1 player short of an even number, I'll take the place, if not, then I'll just host it.  smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#13 2012-04-24 09:30:30

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

me?

@hardmath, why not just link to wikipediatongue

Offline

 

#14 2012-04-24 10:25:30

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Ok, sure. You can be one captain.  smile

Last edited by Hardmath123 (2012-04-24 10:26:01)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#15 2012-04-24 10:38:31

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Maybe we should set a competition start date and advertise a bit to give other people a chance to take part? I'm still not sure if I'll have the time, exams are coming up, but it sounds like a wonderful challange!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#16 2012-04-24 10:41:44

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Aw, sorry to hear that. Things are always so cool with you participating...  tongue

I like your idea, though. How about we start on May 1, and end on May 20th for the final showdown(s)? Until then, every time a user says a definitive yes, I'll add them to alternate teams to be fair.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#17 2012-04-24 10:54:03

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Haha, my exams are 4th May to 24th May! I'm really sorry! What I might do, though, is run an AI pathfinding competition after that, since I'll have no Uni until September (Mega-long summer holiday, I'll have to take a summer class or something to stop myself going mad at home).


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#18 2012-04-24 11:08:31

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Ah. Well, that's life, I suppose, too bad it didn't work out.  sad  Pathfinding sounds good.  big_smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#19 2012-04-24 11:55:06

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

In the meantime, you could work on a basic framework for representing the board in Javascript, for everyone to use to develop their AIs. It'd be really neat if you could render the board on screen, too, so you could see the AI playing — maybe using Canvas, or a library like Raphael?


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#20 2012-04-24 18:46:21

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

I'll definitely take part. (if I can find the time)


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#21 2012-04-25 01:44:33

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Ok, so the teams are (so far):

Blue Team
Roijac
bobbybee
Red Team
blob8108
(Hardmath123 if it is still short of one player on May 1)

@blob8108: The game will be available as a download where you can watch the teams play in real time on an HTML5 canvas. Later, I'm going to write the entire match as a Scratch program (animation) for all to see.  smile  Here's my current prototype for the board:

Each row of hexagons in the rhombus is an array, with each member representing one place (from left to right). A member can be "R", "B", or "-", standing for "Red", "Blue", or "Empty". Each row-array is contained in a larger array called "board", from top to bottom. So board[0][0] is the top-left hex, board[9][9] is the bottom-right, and board[5][5] is the middle hex.

The Red team must get a continuous line from any item of board[0] to any item of board[9], while the Blue team must get a continuous line from board[n][0] to board[n][9], where "n" could be anything.

Does that sound good?

Last edited by Hardmath123 (2012-04-25 01:44:54)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#22 2012-04-25 09:36:47

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

This game would work perfectly with a trinary-code bitmap (too bad they don't exist  tongue ).

Holding off on this until exams are over is probably a good idea.

Each team should make sure its computer can play from either side of the board.  I'm a little concerned that this game might be simple enough that almost every game would end in a tie.  I actually would advocate a more complex game (like chess?).

Last edited by MoreGamesNow (2012-04-25 09:37:00)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#23 2012-04-25 10:18:36

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

MoreGamesNow wrote:

This game would work perfectly with a trinary-code bitmap (too bad they don't exist  tongue ).

Holding off on this until exams are over is probably a good idea.

Each team should make sure its computer can play from either side of the board.  I'm a little concerned that this game might be simple enough that almost every game would end in a tie.  I actually would advocate a more complex game (like chess?).

chess is way too complex.
and theoretically the first player will always win  smile

suggestion: each team has to make something a bit random...

Offline

 

#24 2012-04-25 11:07:18

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

MoreGamesNow wrote:

I actually would advocate a more complex game (like chess?).

...  big_smile  Agree. I don't think chess is too complex at all!


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#25 2012-04-25 11:35:44

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

no, it's not complex at all...
just think about a good algorithm to find all available next moves, that includes:
pinned pieces
check
castling
promotion
en passant (we could leave this out)

come back to me when you wrote one...

Offline

 

Board footer