Pre-built version of this server is available online at https://api.pegovka.space/
Swagger docs: https://api.pegovka.space/swagger
src/CosmicMachine/message.txt.render-messages.sh (.NET Core should be installed)./message directory.src/CosmicMachine/CSharpGalaxy.compile-galaxy.sh (.NET Core should be installed)./galaxy directory.Run icfpcontest2020/galaxy image on port 12345. Image will be downloaded from Docker Hub:
$ docker run --rm -p 12345:12345 icfpcontest2020/galaxy
Open this url in browser: http://localhost:12345/swagger - you
will see Swagger docs page for Galaxy API.
Try to send simple Countdown request ([0], which is modulated as 1101000):
$ curl -d "1101000" -X POST "http://localhost:12345/aliens/send"
You should see modulated response [1,0] (success, countdown is zero):
11011000011101000
So, if everything is fine, then you can use address http://localhost:12345
as serverUrl for your Galaxy Pad implementation.
Clone, build with Docker and run on port 12345:
$ git clone [email protected]:icfpcontest2020/galaxy.git
$ cd galaxy
$ docker build -t galaxy .
$ docker run --rm -p 12345:12345 galaxy
Other steps are the same as described earlier.
Use provided bash-scripts mod.sh and dem.sh (.NET Core should be installed).
You can modulate/demodulate strings from STDIN or from command line arguments:
$ ./mod.sh "[0, 1]"
11010110110000100
$ ./dem.sh 11010110110000100
[0, 1]
$ echo "[0, 1]" | ./mod.sh
11010110110000100
$ echo 11010110110000100 | ./dem.sh
[0, 1]
You also can pipe this modulating/demodulating with sending requests to Alien server:
$ ./mod.sh "[1,0]" | curl -X POST -s -d @- "http://localhost:12345/aliens/send" | ./dem.sh
[1, [[0, 5939854065736244037], [1, 7463090120749941785]]]
$ ./mod.sh "[1,0]" | http "http://localhost:12345/aliens/send" | ./dem.sh
[1, [[0, 5939854065736244037], [1, 7463090120749941785]]]
Content type
Image
Digest
Size
86.5 MB
Last updated
about 6 years ago
docker pull icfpcontest2020/galaxy