forked from ssardina/ergo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor documentation: compatible with markdown
- Loading branch information
Showing
26 changed files
with
285 additions
and
475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Game Examples | ||
|
||
This directory contains ERGO programs for game playing as described in Chapter 5 of the book. These games use BATs as usual, but no programming constructs. They call "`ergo-play-game`" instead of "`ergo-do`". | ||
|
||
The directory contains the following: | ||
|
||
- `ttt.scm`: The game of TicTacToe | ||
- `pousse-main.scm`: The game of Pousse | ||
- `pousse-bat.scm`: An auxiliary file for Pousse |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# PlanningExamples | ||
|
||
This directory contains ERGO programs for planning as described first in Chapter 3 and then in a more general form in Chapter 12. | ||
|
||
Instead of `ergo-do`, they call `ergo-simplan` for basic planning, and `ergo-genplan` or `ergo-gendo` for more advanced planning. | ||
|
||
The directory contains the following: | ||
|
||
- `farmer.scm`: Chapter 3 (`ergo-simplan`) | ||
- `jealous-bat.scm`: Chapter 3 | ||
- `jealous-main.scm`:Chapter 3 (`ergo-simplan`) | ||
- `3bars.scm`: Chapter 12 (`ergo-genplan`) | ||
- `bars-bat.scm`: Chapter 12 | ||
- `hanoi.scm`: Chapter 12 (`ergo-genplan`) | ||
- `red-blue-bat.scm`: Chapter 12 | ||
- `sort.scm`: Chapter 12 (`ergo-genplan`) | ||
- `striped.scm`: Chapter 12 (`ergo-genplan`) | ||
- `two-towers.scm`: Chapter 12 (`ergo-genplan`) | ||
- `prog-12bars.scm`: Chapter 12 (`ergo-gendo`) | ||
- `prog-hanoi.scm`: Chapter 12 (`ergo-gendo`) | ||
- `prog-striped.scm`: Chapter 12 (`ergo-gendo`) | ||
- `prog-two-towers.scm`: Chapter 12 (`ergo-gendo`) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Examples | ||
|
||
This directory contains a number of small ERGO programs that appear as examples in the book mainly in Chapters 3, 4, 5, and 6, but also in Chapters 11 and 12. | ||
|
||
The directory contains the following: | ||
|
||
- `GameExamples/`: from Chapter 5 | ||
- `PlanningExamples/`: from Chapters 3 and 12 | ||
- `basic-elevator.scm`: Chapter 1 and 6 | ||
- `delivery-bot.scm`: Chapter 5 | ||
- `grocery-bat.scm`: Chapter 4 | ||
- `grocery-main.scm`:Chapter 4 | ||
- `house-bat.scm`: Chapter 3 | ||
- `lift-table.scm`: Chapter 5 | ||
- `reactive-elevator-bat.scm`: Chapter 6 | ||
- `reactive-elevator-run.scm`: Chapter 6 | ||
- `reactive-elevator-tcp1.scm`: Chapter 6 | ||
- `reactive-elevator-tcp2.scm`: Chapter 6 | ||
- `reactive-elevator-tcp3.scm`: Chapter 6 | ||
- `sonar-robot.scm`: Chapter 11 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Projects | ||
|
||
This directory contains subdirectories for three ERGO projects. It contains the following: | ||
|
||
- `Squirrels/`: Files for the project in Chapter 7 | ||
- `LEGO/`: Files for the project in Chapter 8 | ||
- `Unity3D/`: Files for the project in Chapter 9 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# AN ELEVATOR SIMULATION IN RACKET | ||
|
||
This is a very simple elevator simulation written in Racket Scheme (independent of ERGO). There is an elevator located on a certain floor with a number of call buttons illuminated. On input from the user, the elevator moves up and down and can extinguish call button lights. That's about it. | ||
|
||
See Chapter 6 on how to control this simulation from ERGO. | ||
|
||
This directory contains the following: | ||
|
||
- `elevator-server.scm`: The entire Scheme program | ||
- `ele.png`: A graphics file used by the simulation | ||
- `red.jpeg`: A graphics file used by the simulation | ||
|
||
To run the simulation, you need Racket Scheme <http://racket-lang.org/>. I used version 5.2. Other versions may work too. What follows are instructions for using the program under Linux. Using it with Windows or a Mac is similar. | ||
|
||
Confirm that Racket is installed properly: | ||
|
||
```shell | ||
Linux%> racket -e '(+ 3 4)' | ||
7 | ||
``` | ||
|
||
If this works, then start the elevator (called "`elevator-server.scm`") by typing something like this at the command-line: | ||
|
||
```shell | ||
Linux%> echo "((up 10) (down 6))" | racket -fm elevator-server.scm | ||
``` | ||
|
||
This should start the simulation window. You should see the elevator inching its way up to floor 10, down to floor 6, and then quitting. You can also abort the session before the end by typing "q" in the server window. | ||
|
||
The elevator simulation expects to read a single list of actions to perform on standard input. The actions are | ||
|
||
- `(up n)`: go up to floor `n` | ||
- `(down n)`: go down to floor `n` | ||
- `(turnoff n)`: turnoff call button `n` | ||
|
||
No error checking is done. | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# EV3 LEGO RObot | ||
|
||
This directory contains Python code that can used to create a server that will manage a LEGO robot on instructions from an ERGO program. It assumes that the EV3dev operating system has already been installed on a micro-SD card for the [EV3 Brick](https://www.lego.com/en-us/product/lego-mindstorms-ev3-31313) of the LEGO robot. See https://www.ev3dev.org/ for instructions. | ||
|
||
The use of this code with ERGO is described in Chapter 8 of the book. | ||
|
||
This directory contains the following: | ||
|
||
- `misc/`: Code to test motors/sensors (no TCP) | ||
- `ergo_communications.py`: Code to read/write over TCP | ||
- `test_server.py`: Code to confirm working TCP | ||
- `manager1.py`: Code to confirm motor/sensor TCP control | ||
- `delivery_manager0.py`: Code for delivery robot of Chapter 8 | ||
|
||
All these files should be copied to the EV3 Brick for execution there. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Servers | ||
|
||
Servers are programs that an ERGO program can interact with over TCP when it is run online. The idea is that ERGO produces endogenous actions as it running which a server will consume and do something reasonable with. Also, the server may produce its own exogenous actions which ERGO will consume and | ||
do something reasonable with. | ||
|
||
This directory contains the following: | ||
|
||
- `generic-action-server.scm`: Code for building Scheme-based servers | ||
- `sonar-robot-server.scm`: A simple robot server for Chapter 11 | ||
- `BasicElevator/`: An online elevator server for Chapter 6 | ||
- `Squirrels/`: A simulated world for Chapter 7 | ||
- `EV3/`: A LEGO robot server for Chapter 8 | ||
- `Unity3D/`: A Unity robot server for Chapter 9 | ||
|
||
Each subdirectory will contain its own explanatory README file. | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.