Level/Robot Racing: Difference between revisions

From Turing Complete
w:c:strategywiki>Henke37
(Add copy-pasteable code to the solution)
(Include fast bot controls)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Header Nav|game=Turing Complete}}
{{Header Nav|game=Turing Complete}}
{{Infobox level
| section            = Assembly Challenges
| type                = Architechture
| architechture      = Leg
| prerequisite1      = Functions
| unlocks-level1      = Tower of Alloy
}}


{{achievement
{{achievement
Line 83: Line 90:
down</nowiki>
down</nowiki>


==Controls==
You can experiment with moving the robot using keys, but this cannot solve the level.
{{:Level/Robot_Racing/controls}}


{{Footer Nav|game=Turing Complete|prevpage=AI Showdown|nextpage=Unseen Fruit}}
{{Footer Nav|game=Turing Complete|prevpage=AI Showdown|nextpage=Unseen Fruit}}

Latest revision as of 21:31, 13 November 2023

Section Assembly Challenges
Type Leg  Architechture
Prerequisite Functions
Unlocks Tower of Alloy
Scored No
API {{{api-enum-id}}} ({{{api-enum-number}}})

Template:Achievement

This level asks you to program FastBot, a robot that can move in any cardinal direction without having to turn first, but as a trade off can't see where he's going.

The level is a preset snaking path. It a Hilbert curve.

There are two main approaches to solving this level. The first one is to generate the curve using recursion. The second one is to hardcode the path and forego elegance completely.

Hardcoded Solution[edit | edit source]

It is entirely possible to create a specialized architecture for the level that is little more than a counter, a program and the output pin. Ironically, it takes 63 moves to complete the path, so a one byte per opcode custom arch will pass the achievement limit.

up
right
down
right
right
up
left
up
right
up
left
left
down
left
up
up
right
up
left
up
up
right
down
right
up
right
down
down
left
down
right
right
right
up
left
up
up
right
down
right
up
right
down
down
left
down
right
down
down
left
up
left
left
down
right
down
left
down
right
right
up
right
down

Controls[edit | edit source]

You can experiment with moving the robot using keys, but this cannot solve the level.

Key/Button Control
Move left
Move right
 ↑  Move up
 ↓  Move down