GridOS 1 quest 1, Peter

Peter won the part 2 steps competition. Let’s take a look.

And also let’s look at the rules actually used.

START A****A**** PREP  _****_**** RUDUDLUDUD
PREP D****A**** MOVE3 P****P**** RRRUDLLLUD
MOVE3 B****A**** MOVE PPP**P**** RRRRRLLLLL
MOVE D****B**** MOVE PPPPPP**** RRRRRLLLLL
MOVE A****D**** MOVE PPPP*P**** RRRRRLLLLL
MOVE P****P**** STOP ********** RRRRRLLLLL

Head 1 and 6 are reading. In the 1st step, there are 2 A’s, so they’re just deleted. Meanwhile the heads are spreading. In the 2nd step, there’s DA. Write 2 P’s and remember, that we need 3 more / go to state MOVE3.

Other cases employ PREP1, still preparing everything, and we need 1 more P. This goes up to PREP8. Similarly there’s a MOVE10. And whole families of MOVEC and MOVED. There’s nothing very complicated here, looking at each group of rules. There’s just a lot. 454 rules in all.

This one is in a perpetual debt, owing 8 P’s in the preparation rule and 4 in the move rules.

START   D****D**** PREP8   P****P**** RUDUDLUDUD
PREP8 D****D**** MOVED_4 PPP**PPP** RRRUDLLLUD
MOVED_4 D****D**** MOVED_4 PPPPPPPPPP RRRRRLLLLL
MOVED_4 P****P**** S ***PP***PP SSSRRSSSLL
S ********** STOP PPPPPPPPPP RRRRRLLLLL

Code .

Skriv en kommentar