Deep Control, or Keypad Conundrum

You need to enter a code on a number pad. Unfortunately, the number pad is inaccessible for you, but there is a remotely controlled robotic arm next to it. The remote control has the usual arrow buttons to control the position of the arm and an “Action” button to make it press the keys. Unfortunately, this remote control pad is also inaccessible. However, there is another robot arm that can also be remotely controlled to press the buttons on this pad. Unfortunately… You guessed it! That remote control pad is inaccessible as well! But fortunately! There is yet another robot arm, and you do have access to its remote control!

This is the setup of one of 2024's excellent Advent of Code puzzles. You can see the puzzle here, and read the gripping details of this dire situation in the description of the puzzle.

Questions to ponder

Also, if you are interested in programming, try the solve the original Advent of Code puzzle!

Try it!

You can play with the app below. Your goal is to enter the target code on the number pad and then press “A” on it. However, you can only control the top left key pad, all the others only indirectly. The current position of the robot arms is shown by the colored markers over the keys.

Target: 6358
Code:   
A
A
A
7
8
9
4
5
6
1
2
3
0
A

You won!

Congratulations! You've guessed the correct code.

KRRRSHNK!

That's incorrect. Try again!