A delivery, flown by hand and kept
Cyan base to red base: twenty five seconds of steering, recorded with --record-pad and replayed as a test. THE FIRST FIXTURE HERE THAT WAS PLAYED RATHER THAN WRITTEN. It is the only check that a cargo ever reaches anywhere. Several attempts at authoring a flight like it by hand got within two columns and no closer, which is a piloting exercise rather than a test - and the whole reason the recorder exists. What is checked is the FIRST LETTER of what the base answers. Delivered, Loaded, Nowhere and Not are 30, 22, 37 and 37 pixels of white in that cell, so a D is a delivery and nothing else is. Counting the whole message would pass on any message of the same length, and comparing the picture would fail the next time anything about a font changed. It took three flights to get here and two of them were lost to bugs in the recorder: one that recorded the wrong pad, and one that recorded a pad sampled on a different clock from the one the machine read. Both were found by somebody watching a replay and saying it was not what they flew, which nothing in this suite could have said. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
co-authored by
Claude Opus 5
parent
ee77d79780
commit
60e0196fe2
Binary file not shown.
Binary file not shown.
@@ -1758,6 +1758,35 @@ UNSAID="$(countColour "$BUILD/unsaid.ppm" f0f0f0)"
|
||||
&& result ok "and opening the throttle wipes it" "the line went with the moment" \
|
||||
|| result no "and opening the throttle wipes it" "$UNSAID pixels of it still there"
|
||||
|
||||
# ---- A delivery, flown by hand and kept ----
|
||||
#
|
||||
# THIS ONE WAS PLAYED RATHER THAN WRITTEN. Cyan base to red base, twenty five seconds of
|
||||
# steering recorded with --record-pad and replayed here. Several attempts at authoring a
|
||||
# flight like it by hand got within two columns and no closer; that is a piloting exercise
|
||||
# rather than a test, and playing it once is the whole answer.
|
||||
#
|
||||
# What is checked is the FIRST LETTER of the message the base gives back. Delivered, Loaded,
|
||||
# Nowhere and Not are 30, 22, 37 and 37 pixels of white in that cell, so a D is a delivery and
|
||||
# nothing else is. Counting the whole message would pass on any message of the same length;
|
||||
# comparing the picture would pass on nothing at all the next time a font changes.
|
||||
#
|
||||
# It is the only check that a cargo ever reaches anywhere, and it is the reason the recorder
|
||||
# exists.
|
||||
timeout 60 "$EMU" --fast --cycles 26000000 --keyboard "$ROOT/Tests/input/landerDemo.keys" \
|
||||
--pad "$ROOT/Tests/input/landerDemo.pad" --screen "$BUILD/demo.ppm" \
|
||||
--disk "$ROOT/Tests/build/disks/cosmos.img" --ram-disk 2048 \
|
||||
"$BUILD/cosmos.bin" > "$BUILD/demo.out" 2>&1 || true
|
||||
FIRST="$(python3 -c "
|
||||
d = open('$BUILD/demo.ppm', 'rb').read()
|
||||
px = d[d.index(b'255\n') + 4:]
|
||||
w, white = 320, bytes.fromhex('f0f0f0')
|
||||
print(sum(1 for x in range(8) for y in range(8, 16)
|
||||
if px[(y * w + x) * 3:(y * w + x) * 3 + 3] == white))
|
||||
" 2>/dev/null || echo -1)"
|
||||
[ "$FIRST" = "30" ] \
|
||||
&& result ok "a flown delivery arrives" "the base answered with a D" \
|
||||
|| result no "a flown delivery arrives" "$FIRST pixels in the first cell, and a D is 30"
|
||||
|
||||
# ---- The landing pads, carved and coloured ----
|
||||
#
|
||||
# A random walk does not leave flat ground and a lander wants some, so four pads are carved
|
||||
|
||||
Reference in New Issue
Block a user