Quantcast


Google turns Portal into a coding problem photo

I may know next to nothing about the intricacies of programming, but I do know a minimalist 2D version of Portal when I see it. The above images are examples from the third round problem in Google’s Code Jam, an ongoing competition that gives professional and student programmers the chance to score some cash and a trip to Google Headquarters if they place in the top 100.

Rather than trying to escape the empty halls of Aperture Science, this problem has players guiding a portal gun equipped red dot through a maze to reach a cake (that isn’t a lie) in as few steps as possible. Here’s a snippet from the description:

For this problem you find yourself in a R by C grid. Additionally there is a delicious cake somewhere else in the grid. You're very hungry and wish to arrive at the cake with as few moves as possible. You can move north, south, east or west to an empty cell. Additionally, you have the ability to create portals on walls.

Given the maze, your initial position, and the cake's position, you want to find the minimum number of moves needed to reach the cake if it is possible. Remember that shooting the portal gun does not count as a move.


There’s also some coding mumbo-jumbo that doesn’t make all that much sense to me, but if you can understand it feel free to download the two mazes and give them a try.

[Thanks, Michael]








More gaming stories around the web. Got news? Submit yours to tips@destructoid.com



Post a comment! You can also post a photo below:

Comment with Facebook





Click connect and comment instantly!

Comment with Dtoid





New? SIGN UP - it takes 5 seconds

7 comments | showing # 1 to 7
prev next

pendelton21's Avatar - Comment posted on 08/11/2008 02:21
pendelton21
lol wut
Foxdie's Avatar - Comment posted on 08/11/2008 06:30
Foxdie
Yeah, the portal gun definitely adds some complexity to path finding algorithms. No wonder Portal didn't have any traditional enemies - just some stationary turrets with quirky personalities and an insane robot voice.

Also, I now think I have a solution to the Traveling Salesman Problem: Think with portals.
Brian Szabelski's Avatar - Comment posted on 08/11/2008 08:50
Brian Szabelski
The Google team are a bunch of nerds. :p
Eschatos's Avatar - Comment posted on 08/11/2008 09:54
Eschatos
They could have finished that picture in two moves. Lazy.
mistic's Avatar - Comment posted on 08/11/2008 11:12
mistic
I hope its made in honour of, and not a blatant copy :)
stevesan's Avatar - Comment posted on 08/11/2008 11:43
stevesan
If someone comes up with a good AI that can navigate with the Portal gun, props to them!

And they'll be hired by Valve, so Portal can have an escort mission. Sw33t!
wardrox's Avatar - Comment posted on 08/12/2008 03:01
wardrox
haha, awesome. I may just have a play with this.
prev next

Comment with Facebook





Click connect and comment instantly!

Comment with Dtoid





New? SIGN UP - it takes 5 seconds

Comments policy

Destructoid is an open discussion community. You don't need to "audition" to post a comment - just speak your mind. We respect differing opinions on the site, so have at it. Be smart, funny, insightful, clueless, or cute -- but back it up with substance. Keep your cool, keep it fun. We only ask that you act respectfully and above all: don't be a troll and ruin it for everyone else. Don't bring down gamers or we'll, you know, gently shoot you in the face and stuff you into a flaming mailbox. Each comment is your opportuntity to make this community awesomer. Is that even a word?

Avoiding the banhammer only requires common sense: spamming, trolling, racism, NSFW stuff, and other forms of sucking will not be tolerated. If anyone is griefing please report abuse. Be good. Don't suck!