descriptionRandomized Scheme environment with Archipelago integration
last changeSat, 24 May 2025 05:05:23 +0000 (22:05 -0700)
readme

SICPelago

SICPelago is a randomized Scheme environment where you unlock core capabilities by solving carefully selected exercises adapted from Structure and Interpretation of Computer Programs. Starting only with your trusty lambda and the supporting quote, climb your way to the top of the textbook, exploring math puzzles, composite data structures, and infinite sequences.

Single-player Instructions

% python3 game.py

Be warned that the single-player mode does not implement "logic", i.e. cons may be locked behind a problem that requires cons to solve. You can still play by using #unlock as necessary.

Archipelago Instructions

  1. Download the Archipelago source.

  2. Symlink the SICPelago apworld into the Archipelago source:

    [~/Archipelago/]% ln -s path/to/sicpelago/apworld/sicp worlds/
    
  3. Add a handwritten player YAML file for SICPelago to the Players directory:

    # your-name.yml
    name: Your Name Here
    game: SICPelago
    SICPelago: {}
    
  4. Collect all other players' YAML files into your Players directory. (It has to be you who does this because you have the SICPelago apworld.)

  5. Generate the game:

    [~/Archipelago/]% python3.10 Generate.py
    
  6. Upload the generated game (the zip file in the output directory) to https://archipelago.gg/uploads, and then choose to "Create New Room".

  7. Connect using the SICPelago client, making sure to get the right port number from the room in step 6:

    [~/Archipelago/]% python3.10 Launcher.py SICPelago -- \
        --connect archipelago.gg:$PORT --name "Your Name Here"
    

If you want to come back to the game later, SICPelago won't remember your environment or what puzzles you've solved, but it will at least remember what items you've unlocked. Note that you may need to refresh the room page on the Archipelago site to get a fresh port number.

Areas for improvement

License

Several files are derived from the original UC Berkeley Python-based Scheme interpreter: autograder.py, buffer.py, ucb.py, and all files starting with scheme. The license for these files is unclear (particularly since I grabbed these original versions from the past), but I might optimistically assume they'd be licensed under a CC BY-SA 3.0 license, matching Composing Programs by John DeNero which the project was designed to complement. If so, my modifications to these files are likewise licensed as CC BY-SA 3.0.

locations.yml contains text derived from Structure and Interpretation of Computer Programs under a CC BY-SA 4.0 license and is thus licensed as CC BY-SA 4.0 itself.

game.py, game_prelude.scm, and all files under apworld/ other than locations.yml are my creation and are licensed as CC BY-SA 3.0 for simplicity. Also, all this code is pretty bad and you probably shouldn't use it for anything else anyway.

Archipelago, by LLCoolDave, LegendaryLinux, CaitSith2, Berserker66, and many others, is used under the MIT License.

shortlog
2025-05-24 Jordan RoseMore test fixes main
2025-05-20 Jordan RoseProperly check param/argument matching (oops)
2025-05-20 Jordan RoseFix test cases
2025-03-31 Jordan Roseapworld mode april-fools-release
2025-03-31 Jordan RoseFix mis-specified dependencies
2025-03-31 Jordan RosePolish for initial upload
2025-03-31 Jordan RoseAdd one kind of trap
2025-03-30 Jordan RoseAdd item classifications
2025-03-30 Jordan RoseSort items
2025-03-30 Jordan RoseAdd solution checking
2025-03-30 Jordan RoseFix running scheme.py on its own
2025-03-30 Jordan RoseFix min and max, oops
2025-03-30 Jordan RoseImplement in-game progress tracking and stuff
2025-03-30 Jordan RoseNo turtles here
2025-03-30 Jordan RoseReorder event processing for better UX
2025-03-30 Jordan RosePass through client messages for printing
...
tags
11 months ago april-fools-release https://belkadan.com/blog/2025...
heads
9 months ago main