Skip to content

Commit fae2b59

Browse files
daphne-cornelisseDaphne
andauthored
Fix small bug in drive.c and add binary weights cpt (#184)
* Add model binary file and make demo() work. * Add docs. * Add docs. --------- Co-authored-by: Daphne <daphn3cor@gmail.com>
1 parent 57be883 commit fae2b59

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,19 @@ For more training data compatible with PufferDrive, see [ScenarioMax](https://gi
9696
<details>
9797
<summary>Dependencies and usage</summary>
9898

99+
## Local rendering
100+
101+
To launch an interactive renderer, first build:
102+
```
103+
bash scripts/build_ocean.sh drive local
104+
```
105+
106+
then launch:
107+
```bash
108+
./drive
109+
```
110+
this will run `demo()` with an existing model checkpoint.
111+
99112
## Headless server setup
100113

101114
Run the Raylib visualizer on a headless server and export as .mp4. This will rollout the pre-trained policy in the env.

pufferlib/ocean/drive/drive.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include "drive.h"
21
#include "drivenet.h"
32
#include <string.h>
43
#include "../env_config.h"
@@ -19,7 +18,7 @@ void test_drivenet() {
1918

2019
// Weights* weights = load_weights("resources/drive/puffer_drive_weights.bin");
2120
Weights *weights = load_weights("puffer_drive_weights.bin");
22-
DriveNet *net = init_drivenet(weights, num_agents);
21+
DriveNet *net = init_drivenet(weights, num_agents, CLASSIC);
2322

2423
forward(net, observations, actions);
2524
for (int i = 0; i < num_agents * num_actions; i++) {
2.34 MB
Binary file not shown.

0 commit comments

Comments
 (0)