E44: a C++ program with no third-party libraries trains a policy on its own Pendulum - #100
Merged
Merged
Conversation
…nv clients on another machine (before the pilot)
…ical machine, and the crossing's cost made of latency and bandwidth
…ed, before running them
…chine; crossing costs a fixed latency plus bytes over the link; amendment reads the arms' gap as seed variation
…ten out, its step-for-step check, and the run script (before the pilot)
…lugrl-env-client's wrapper does - the pilot found the server's episode metrics read nothing else
…ulum, against the Python env client, with rl-zoo's Pendulum PPO settings
…into exp/e44-cpp-pendulum
… a policy on its own Pendulum as well as the Python env client; the pilot found SPEC.md omits info["episode"]
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #99 (E43). Merge that first. This diff then shrinks to
experiments/e44-cpp-pendulum/and one README table row.E44 trains a policy through a C++ program with no third-party libraries. The program steps an environment of its own, and the Python env client is the control.
PROTOCOL.mdwas pre-registered at 70f8cfd, after the pilot.The client.
pendulum_client.cpp:plugrl_client.cpp. After that it carries gymnasium's Pendulum-v1 written out in C++.equivalence.pychecks the C++ Pendulum against gymnasium's, step for step: observations bit-identical, rewards within 1.2e-10, and the same time-limit step, across 20 trials of 200 steps.The result (
results/verdicts.txt). Every prediction holds. The run is gaussian-policy with ppo at rl-baselines3-zoo's Pendulum settings, 25 iterations of 4,096 steps, seeds 1-3.What the pilot found:
info["episode"](r,l,s,mask), which is the only thing the server's episode metrics read. A client written from the spec trained normally but logged a return of 0. The client now sends it as plugrl-env-client's wrapper does. A protocol PR to document it will follow.The control needs plugrl-env-client#10 (Classic-v1 continuous actions). The README's evidence row for "does an env client have to be Python" now cites E44, with E2 kept as the first C++ exchange.