Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
jweeks2023 committed Jun 28, 2024
1 parent 82266d7 commit 2c52a6f
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion get spaceship.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
SQ%,#/-%}4/}4(%}M0!#%3()0}#/523%_~~C.}WUWUj}-/34}/&}53}(!6%},%!2.%$}(/7}4/}/0%2!4%}!}30!#%3()0l}C.}4()3}#/523%}7%e,,}0,!9}!}3-!,,}#(%33k,)+%}'!-%}&%!452).'}4(%}30!#%3()0_}N(%}'!-%}/0%2!4%3}/.}!.}).&).)4%}W>}#(%33}"/!2$j}7)4(}4(%}30!#%3()0}).)4)!,,9},/#!4%$}/.}zfUjUgzl}N(%}30!#%3()0}(!3}!}6%,/#)49}z68z}!.$}z69zj}7()#(}!2%}).)4)!,,9}"/4(}3%4}4/}zUzl}C.}%!#(}452.}4(%}0,!9%2}#!.}).#2%!3%m$%#2%!3%}%!#(}/&}4(/3%}.5-"%23}"9}!4}-/34}/.%j}!.$}4(%.}4(%}0)%#%}-/6%3}z68z}34%03}4/}4(%}2)'(4}!.$}z69z}34%03}50l~~G/6%3}!2%}2%02%3%.4%$}7)4(}!}3).',%}$)')4j}).30)2%$}"9}4(%}/,$}.5-%2)#}0!$}/.}!}#/-054%2}+%9"/!2$}4(!4}7%}53%$}4/}(!6%}).}4(%}/,$}$!93}/.}?!24(l}@/2}%8!-0,%j}z\z}-%!.3}$%#2%!3).'}z68z}!.$}).#2%!3).'}z69z}"9}zVzj}7(),%}z[z}-%!.3}).#2%!3).'}z68z}"9}zVz}!.$}+%%0).'}z69z}4(%}3!-%l};}0!4(}#!.}4(%.}"%}2%02%3%.4%$}"9}!}3%15%.#%}/&}$)')43j}%l'l}4(%}0!4(}zWX[[Z^z}6)3)43j}).}4()3}/2$%2j}4(%}&/,,/7).'}315!2%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}%6!,5!4%3}4/n~~zzz~3/,6%}30!#%3()0R}-/6%3~zzz~~S/52}3#/2%})3}4(%}.5-"%2}/&}-/6%3j}3/}!},/7%2}3#/2%})3}"%44%2l~

"Welcome to the Spaceship course!\n\nIn 2020, most of us have learned how to operate a spaceship. In this course we'll play a small chess-like game featuring the spaceship! The game operates on an infinite 2D chess board, with the spaceship initially located on `(0,0)`. The spaceship has a velocity `vx` and `vy`, which are initially both set to `0`. In each turn the player can increase/decrease each of those numbers by at most one, and then the piece moves `vx` steps to the right and `vy` steps up.\n\nMoves are represented with a single digit, inspired by the old numeric pad on a computer keyboard that we used to have in the old days on Earth. For example, `7` means decreasing `vx` and increasing `vy` by `1`, while `6` means increasing `vx` by `1` and keeping `vy` the same. A path can then be represented by a sequence of digits, e.g. the path `236659` visits, in this order, the following squares: `(0,0) (0,-1) (1,-3) (3,-5) (6,-7) (9,-9) (13,-10)`.\n\nNow the challenge is the following: given a list of squares to be visited, find a sequence of moves that visits all those squares. Your solution may consist of at most `10,000,000` moves.\n\nThe following levels are available:\n* [spaceship1] Best score: 5.\n* [spaceship2] Best score: 49.\n* [spaceship3] Best score: 10.\n* [spaceship4] Best score: 207.\n* [spaceship5] Best score: 119.\n* [spaceship6] Best score: 417.\n* [spaceship7] Best score: 115.\n* [spaceship8] Best score: 109.\n* [spaceship9] Best score: 532.\n* [spaceship10] Best score: 797.\n* [spaceship11] Best score: 8192.\n* [spaceship12] Best score: 129126.\n* [spaceship13] Best score: 111684.\n* [spaceship14] Best score: 908.\n* [spaceship15] Best score: 78.\n* [spaceship16] Best score: 2858.\n* [spaceship17] Best score: 839.\n* [spaceship18] Best score: 3518.\n* [spaceship19] Best score: 23614.\n* [spaceship20] Best score: 5952.\n* [spaceship21] Best score: 5868.\n* [spaceship22] Best score: 5351.\n* [spaceship23]\n* [spaceship24]\n* [spaceship25]\n\nTo submit a solution, send an ICFP expression that evaluates to:\n\n```\nsolve spaceshipX moves\n```\n\nYour score is the number of moves, so a lower score is better.\n"
"Welcome to the Spaceship course!

In 2020, most of us have learned how to operate a spaceship. In this course we'll play a small chess-like game featuring the spaceship! The game operates on an infinite 2D chess board, with the spaceship initially located on `(0,0)`. The spaceship has a velocity `vx` and `vy`, which are initially both set to `0`. In each turn the player can increase/decrease each of those numbers by at most one, and then the piece moves `vx` steps to the right and `vy` steps up.

Moves are represented with a single digit, inspired by the old numeric pad on a computer keyboard that we used to have in the old days on Earth. For example, `7` means decreasing `vx` and increasing `vy` by `1`, while `6` means increasing `vx` by `1` and keeping `vy` the same. A path can then be represented by a sequence of digits, e.g. the path `236659` visits, in this order, the following squares: `(0,0) (0,-1) (1,-3) (3,-5) (6,-7) (9,-9) (13,-10)`.

Now the challenge is the following: given a list of squares to be visited, find a sequence of moves that visits all those squares. Your solution may consist of at most `10,000,000` moves.

The following levels are available:
* [spaceship1] Best score: 5.
* [spaceship2] Best score: 49.
* [spaceship3] Best score: 10.
* [spaceship4] Best score: 207.
* [spaceship5] Best score: 119.
* [spaceship6] Best score: 417.
* [spaceship7] Best score: 115.
* [spaceship8] Best score: 109.
* [spaceship9] Best score: 532.
* [spaceship10] Best score: 797.
* [spaceship11] Best score: 8192.
* [spaceship12] Best score: 129126.
* [spaceship13] Best score: 111684.
* [spaceship14] Best score: 908.
* [spaceship15] Best score: 78.
* [spaceship16] Best score: 2858.
* [spaceship17] Best score: 839.
* [spaceship18] Best score: 3518.
* [spaceship19] Best score: 23614.
* [spaceship20] Best score: 5952.
* [spaceship21] Best score: 5868.
* [spaceship22] Best score: 5351.
* [spaceship23]
* [spaceship24]
* [spaceship25]

To submit a solution, send an ICFP expression that evaluates to:

```
solve spaceshipX moves
```

Your score is the number of moves, so a lower score is better.

0 comments on commit 2c52a6f

Please sign in to comment.