Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pufferlib/ocean/drone_race/drone_race.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Standalone C demo for DroneRace environment
// Compile using: ./scripts/build_ocean.sh drone [local|fast]
// Run with: ./drone
// Compile using: ./scripts/build_ocean.sh drone_race [local|fast]
// Run with: ./drone_race

#include "drone_race.h"
#include "puffernet.h"
Expand Down Expand Up @@ -124,16 +124,16 @@ int main() {
env->max_moves = 1000;
env->max_rings = 10;

size_t obs_size = 25;
size_t obs_size = 29;
size_t act_size = 4;
env->observations = (float *)calloc(obs_size, sizeof(float));
env->actions = (float *)calloc(act_size, sizeof(float));
env->rewards = (float *)calloc(1, sizeof(float));
env->terminals = (unsigned char *)calloc(1, sizeof(float));

Weights *weights = load_weights("resources/drone/drone_weights.bin", 136073);
Weights *weights = load_weights("resources/drone_race/drone_race_weights.bin", 136585);
int logit_sizes[1] = {4};
LinearContLSTM *net = make_linearcontlstm(weights, 1, 25, logit_sizes, 1);
LinearContLSTM *net = make_linearcontlstm(weights, 1, obs_size, logit_sizes, 1);

if (!env->observations || !env->actions || !env->rewards) {
fprintf(stderr, "ERROR: Failed to allocate memory for demo buffers.\n");
Expand Down
Binary file removed pufferlib/resources/drone/drone_weights.bin
Binary file not shown.
Binary file not shown.
Loading