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 - 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.
NihonTiger90's Avatar - Comment posted on 08/11/2008 08:50
NihonTiger90
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!

 
New on Destructoid.TV play all videos

Loading
Loading Destructoid Videos


    Win this!
    Dive in! meetup+play for a chance to win a PC

    Dtoid Twitter    Got news?   tips@destructoid.com

    Reviews & Previews
    Crossfire Remote Pistol review
    Resident Evil: The Darkside Chronicles review
    Left 4 Dead 2 review
    Call of Duty: Modern Warfare Reflex review
    Arkedo Series - 02 SWAP! review
    more reviews
    Driver
    Avatar
    GT Racing Motor Academy
    Bad Company 2 beta dishes out meaningful experiences
    Legend of Zelda Spirit Tracks
    more previews


    - The Dtoid Army is 50934 strong -

    Showing Cblogs with 3+ faps   show all

    Call for entries: do the wrong thing

    New to Dtoid? Read the survival guide




     Originals
    Jonathan Holmes: Why No More Heroes HD could mean a Wii total victory





















    More Destructoid Originals




     Popular now more






















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

    Josh Tolentino




     

     
      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