Skip to content

Commit

Permalink
Minor script / README updates
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterFendley committed Jun 14, 2024
1 parent d694dcc commit 97ee296
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
13 changes: 12 additions & 1 deletion examples/QTable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,23 @@ To launch a gui simulation and the model, we can use the following script syntax
**NOTE:** If run without a `--model` flag, the run script will run whatever model is defined by `DEFAULT_RUN_MODEL` in `model/constants.py`
Further, you can change the name of the "enemy" that your agent will look for by the following syntax

```
```bash
./run.sh --model trained/my_cool_model/3000.npy --enemy evan
```

This is helpful using trained agents in missions which they were not trained in.

## Testing models

To test a model's preformance you can use the following script syntax
```bash
./test.sh
# Or
./test.sh --model trained/my_cool_model/3000.npy
# Or
./test.sh --model trained/my_cool_model/3000.npy --episodes 1000
```

## Debugging

### Debugging the simulation while training
Expand Down
3 changes: 2 additions & 1 deletion examples/QTable/scripts/sim_launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ DIRNAME="$(dirname $0)"
cd $DIRNAME

TIME_WARP="10"
# TIME_WARP="1"
# Change below to --log for logging
LOGGING=""

Expand All @@ -26,7 +27,7 @@ cd ..

cd shoreside
./launch_shoreside.sh --no_gui $LOGGING $TIME_WARP >& /dev/null &
# ./launch_shoreside.sh $LOGGING $TIME_WARP >& /dev/null &
# ./launch_shoreside.sh $LOGGING $TIME_WARP >& /dev/null &
sleep 5
echo "DEPLOYING"
uPokeDB targ_shoreside.moos DEPLOY_ALL=true MOOS_MANUAL_OVERRIDE_ALL=false
Expand Down
14 changes: 12 additions & 2 deletions examples/pLearn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ Firstly, make sure your trained model exists in a file structure like this...

Launching the simulation comes in two steps. You will need two consoles **INSIDE** the moos-ivp-agent's docker container... so utilize the `./docker.sh connect` functionality.

You can use the `run.sh` script to launch both the MOOS-IvP simulation and the model.
You can use the `run.sh` script to launch both the MOOS-IvP simulation and the model. A optional `--debug` flag can be added to launch some graphs showing internal model state.

```
```bash
./run.sh
# Or
./run.sh --debug
```

**OR**
Expand All @@ -43,6 +45,14 @@ You can use the `run.sh` script to launch both the MOOS-IvP simulation and the m

**NOTE:** If no `--model` is provided, the `run.py` script will run the model in the `model/trained/topModel/model` directory.

For an example you can use the an existing pre-trained model:

```bash
./run.sh --model model/trained/topModel/model/
# Or
./run.sh --model model/trained/topModel/model/ --debug
```

After the GUI window pops up, you can push the `DEPLOY` button in the lower right.

## Debugging existing models
Expand Down

0 comments on commit 97ee296

Please sign in to comment.