games  anime  |  toys
Destructoid is gaming news, community, videos, and sometimes love. Take the tour or jump in with Facebook:

 


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]


Continue: More Portal stories





prev next

7 comments | showing # 1 to 7

pendelton21's Avatar
pendelton21 at 08/11/2008 02:21
lol wut
Foxdie's Avatar
Foxdie at 08/11/2008 06:30
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.
NihonTiger90's Avatar
NihonTiger90 at 08/11/2008 08:50
The Google team are a bunch of nerds. :p
Eschatos's Avatar
Eschatos at 08/11/2008 09:54
They could have finished that picture in two moves. Lazy.
mistic's Avatar
mistic at 08/11/2008 11:12
I hope its made in honour of, and not a blatant copy :)
stevesan's Avatar
stevesan at 08/11/2008 11:43
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
wardrox at 08/12/2008 03:01
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!

 
New on Destructoid.TV play all videos

Loading
Loading Destructoid Videos




    Win this!
    Reminder: We're giving away six copies of Magnacarta 2!



    Dtoid Twitter    Got news?   tips@destructoid.com

    Reviews & Previews
    Mahjongg Artifacts 2 review
    Dragon Age: Origins review
    Lost Winds: The Winter of the Melodias review
    Osmos review
    Space Invaders Extreme 2 review
    Half-Minute Hero review
    JU-ON: The Grudge review
    Kenka Bancho: Badass Rumble review
    Thexder Neo review
    Domino Rally review
    more reviews
    PS3's 256-player MAG
    Rooms The Main Building
    Skate 3
    Hudson's bringing back the Bonk
    James Cameron's Avatar
    Bomberman Battlefest
    Calling
    Bad Company 2's multiplayer
    Partying like it's 1959 in BioShock 2's multiplayer
    BioShock 2 through the eyes of Big Daddy
    more previews


    - The Dtoid Army is 49595 strong -

    Showing Cblogs with 3+ faps   show all

    Call for entries: do the wrong thing

    New to Dtoid? Read the survival guide




     Originals
    Jim Sterling: How to respond to a videogame review





















    More Destructoid Originals




     Popular now more
























    Destructoid's editorial lovefest is:
    Nick Chester
    Editor-in-Chief
    Jim Sterling
    Reviews Editor
    Dale North
    News Editor
    Hamza Aziz
    Community Manager
    Anthony Burch
    Features Editor
    Rey Gutierrez
    Video editor & director
    Niero
    Founder, publisher
    Letters to the editors
    tips@destructoid.com
    Associate Editors
    Ashley Davis Jonathan Holmes
    Brad Nicholson Jonathan Ross
    Brad Rice Jordan Devore
    Chad Concelmo Matthew Razak
    Colette Bennett Tom Fronczak
    Conrad Zimmerman Topher Cantler
    Dyson Samit Sarkar
    Contributors
    Adam Dork
    Ben Perlee
    Daniel Lingen
    Joseph Leray
    Joe Burling
    Mikey
    Will Maddock
    Stella Wong





     

     
      get involved

    register or login
    post a blog
    post a forum
    enter a contest
    contribute a news tip
    suggest a feature
    be a guest editor
    support

    new member's guide
    login assistance
    tech support
    report abuse
    email our editors
    read our dev blog
    nuclear crisis?
    keep in touch

    RSS feed
    Twitter
    Facebook
    Myspace
    Flickr
    Game nights
    Meetup+play online
    seriously

    about Destructoid
    advertising
    terms of use
    privacy policy
    jobs at MM
    buy our crap
    our network

    Tomopop
    Japanator
    Despingation?




    Destructoid is an independently-run publication forged by our love of video games and the gaming community's need of accountable enthusiast press
    living the dream since March 16, 2006