Google turns Portal into a coding problem

Recommended Videos

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]


Destructoid is supported by our audience. When you purchase through links on our site, we may earn a small affiliate commission. Learn more
related content
Read Article Nintendo wants to sell an ‘aggressive’ 13.5 million Switch consoles by March 2025
How to delete game saves on Switch
Read Article Remedy cancels one of its multiplayer games to better focus on Control and Max Payne
Alan Wake close up in red light
Read Article Helldivers 2 01.000.302 patch notes: DoT finally fixed, R-9 Eruptor changes, more
Automatons standing with weapons in Helldivers 2
Related Content
Read Article Nintendo wants to sell an ‘aggressive’ 13.5 million Switch consoles by March 2025
How to delete game saves on Switch
Read Article Remedy cancels one of its multiplayer games to better focus on Control and Max Payne
Alan Wake close up in red light
Read Article Helldivers 2 01.000.302 patch notes: DoT finally fixed, R-9 Eruptor changes, more
Automatons standing with weapons in Helldivers 2