Showing posts with label contest. Show all posts
Showing posts with label contest. Show all posts

Tuesday, March 02, 2010

The University Of Waterloo CS Club Tron Challenge, And Some Minimax In General - Part 2

(This is the second and final part in the University Of Waterloo CS Club Tron Challenge post series. You can find the first part here.)

Now that the contest is finished, congratulations go out to the first place winner: a1k0n, well done!

I also wanted to pass on a few remaining interesting links and concepts I haven't yet included or explained in my first post.

How did I do? 144th place. Not bad for a heuristic, but next year I'll be using minimax as well.

A small selection of rounds


I'm including some final rounds to show where my bot did well, and where it performed poorly.

The first game starts of like this. My bot is red.
The board after a few moves. Our bot senses it can reach a wall to block our opponent of by going east...
Which is what happens here. It's easy to see we've won now.
Our opponent makes optimal use of the remaining space, but loses.









The second game. We're red again.
We've been chasing blue for a bit.
To close in on blue, we need to go the other way around. But due to our aggressive manoeuvres, we've made a mistake.
Blue exploits our mistakes and blocks us off. Well done.










A new game, we're red again.
The first moves start of pretty symmetric.
We're chasing our opponent for a bit. Since we cannot reach him by going north anymore, we'll go down now...
Which is what happens here. Our bot quickly senses that we can close blue off. It's pretty hard to eyeball here that we'll end up with more room then blue, but our bot seems to be confident.
Indeed, a few seconds later the situation looks like this. It's clear we've won.









Another game. Now we're in blue. I'm picking this round because my bot had a lot of problems with this setup.
By chasing our opponent, we're getting ourselves in a lot of trouble.
And indeed, a few moves later, red can easily corner us.










This game was played against the contest winner, a1k0n, we're blue again.
Both players start of pretty aggressive.
Red makes a slight detour, so we go north to reach him.
Then red turns around, an obvious mistake would be to follow him by going south. In the first part we've mentioned this problem and included a fix to avoid these dead-ends.
...and thus we turn around as well.
Alas, red is still able to close us off before we reach him. I actually consider this a well-played game.


An easier (and better) minimax evaluation function: Voronoi territories



In the previous post I've already mentioned that the most important part of a good minimax strategy is the evaluation (the score) you give to each game state. A lot of players have been using a Voronoi Territory based system to evaluate their positions.

The name comes from Voronoi diagrams, a decomposition of space determined by distances to objects in that space (like points for example). When applied to the game of Tron, we could start with this simple board:

To define our territory, we figure out the quickest way to reach each free square, both for us, and for our opponent:

Our territory is defined by the squares we can reach quicker than our opponent, and vice verso. E.g. red's space is colored in light red, blue's space in light blue:

If we apply this method to each board in our minimax tree, we can assign a score. For example:
score = size of our territory - size of their territory

Articulation points


To expand on this idea, a lot of players also searched for articulation points on the board to see if it would make sense to block those off. Remember: an articulation point is a point such that removal (filling) that point would increase the number of disconnected "chambers". For example, the articulation points in the board above are:

A good strategy checks whether we can reach those articulation points first, if it separates us from our opponent, and if doing so would result in more territory for us than our opponent.

Worth reading


Now that the contest is over, a lot of players have posted their source code in this thread. The git repository of the contest winner is especially worth taking a look at.

Addendum: a1k0n has posted a post-mortem on his blog, which manages to explain things very well. It's a wonderful read.

Saturday, September 16, 2006

My Dream App: More Contestants

It looks like My Dream App has announced all the contestants now. Let's see...

Bob: Pile o' Cards: use piles of cards with anything on them: text, media, widgets, pictures and more. Looks like this could become a handy little app.

Cameron: Atmosphere: 'a virtual outdoors for your desktop' - an enhanced weather application. This can prove handy for a lot of people but personally I wouldn't use it (since I can just look out of my window).

Dan: Blossom: 'a virtual plant that responds to productivity' - wow, this is a cool idea. Withering plants will correspond to lazy, game-playing computer sessions, thriving plants to a good productive day in Excel. Everyone will have different looking plants, awesome.

Dilon: Bookroom: reading e-books in a beautiful interface, looks good, maybe this will give some people an opportunity to read more again.

James: Destinations: the ideal app for the travellers. 'Plan vacations and trips with ease' sounds really useful to me.

Jeff: iGTD, Getting Things Done on the Mac with integration with iCal, IPod and more. Looks like this will also prove to be handy.

Josh: iGotPets: 'keep track of your pet's well-being'. A shame I don't have pets. So personally I wouldn't consider using this, but I can imagine that the 'pet-freaks' out there would love something like this.

Kevin: Hijack: Cocoa interface to browse and participate in discussion forums. Not sure what to make out of this. I'm curious how this will turn out.

Marshall: SweepIt: cleanup messy desktops with simple rules. I would love something like this (on all my machines, on all platforms). Since I spend a lot of time keeping my desktop and folders in clean, pure condition.

Mickey: Supplemental: 'Photo Booth for videos, with easy to use video logging'. If you're into videos (a lot of Mac-people are), then this could provide you with some extra help.

Mike: iSightSee: control your Mac using the iSight with hand gestures and movements. If this works (meaning: it actually does a good job at recognizing the different gestures) then this could also become a handy tool.

Raven: Telepath: push mail, news and more from your Mac via SMS. I wouldn't use this (it probably would be difficult to setup in some countries and/or it would cost a lot and my phone inbox is currently more than full), but some people might love it.

Richard: Whistler: 'ever had the urge to create a song'? With Whistler: you just tap, hum or whistle something into the app. Wow: if this works fine this would be amazing!

Rusell: Ground Control: 'Dashboard done right'. What can I say about this one? Let's see how it develops...

I think I have them all now. Again: all ideas are great and it looks like the competition will be hard! Check out MyDreamApp for more info. Nominating the contestants will be fun but difficult.

Friday, September 08, 2006

My Dream App finalists...

My Dream App - "Idol 2006" for Mac developers, has begun announcing finalists with - at this moment - still 15 people to go.

All the ideas are looking pretty neat at the moment:

Anders - Stick-It: 'A modernized sticky solution that lets people use virtual stickies just as they do in real life.' Sounds really cool and handy, but I think this app will have a hard time to compete with existing or comparable apps.

Andrew - Desktop Wars: an RTS game played on your desktop. As a matter of fact, I once tried to make a similar game when I was younger and when I had almost no programming experience. I never completed it. So I'm pretty exited about this idea.

Bogumil - Herald: a virtual newspaper app, using RSS and other technologies. Looks promising and it would be a great app if it can introduce the concept of RSS to more people.

Farzad - Portal: 'File syncing from the future.' I almost never use file-syncing apps (mostly because most of them are a pain to use). So if this app works out, it will make a lot of people happy!

Joe - Puppet Constructor: Flash for beginners: manipulate and animate 'puppets' with the ease of a toy. This is great, everyone who starts working with a complex app like Flash, or Photoshop or a 3d animation program wants to imitate 'all that cool stuff' they saw online or in magazines, only to be dissapointed with the steep learning curve. This app will probably provide hours of fun.

Michael - Chatboard: a virtual whiteboard. Has the potential to turn into a great collaboration tool, but it will again be a challenge to compete with other products in my opinion.

Michael - Cookbook: a lovely idea. Of course there already are cookbook applications, but this one will do online shopping, voiceovers, sharing, and more, the concept screenshot looks really neat.

Peter - Bubble Fish: 'Bubble Fish is the friend who knows everything, but without the annoyance factor.' With the abily to search on Flickr, Google and Wikipedia, this could turn out as a very handy little research tool.

Windy - iStyleIt: a 'virtual closet for your Mac', pick out, arrange and rate clothes and combinations. Sounds like a silly idea? Not really when you think about it. Share combinations with friends and save time in the morning when choosing what to wear. Even me (a guy!) like this idea... a modern life-app.

Be sure to check out mydreamapp.com, this whole 'contest-concept' is very entertaining and I will surely keep an eye on further development.

The only downside? Mac only, but it's better than Windows-only (now maybe some apps have the chance to get ported to Linux, one can hope).

See you next time!