Learning experiment
Basketball Shot RL: continuous-action policy gradients
A PyTorch REINFORCE study that learns basketball power and angle through continuous action distributions and held-out wind evaluation.
A rocket chooses among discrete engine actions. A basketball launcher instead chooses how much power and which angle to use. Basketball Shot explores that difference while reusing the RL Playground environment.
Let the environment and training study stay separate
RL Playground supplies the court, collisions, wind, scoring, and rendering. This repository owns the network, experiment settings, REINFORCE updates, evaluation, and visualizations. Its pinned dependency revision makes that relationship explicit.
A shot has one decision: choose power and angle. This makes the return equal to the shot’s reward, so the familiar gamma setting has no effect on this one-step task.
Model a distribution over shots
The PyTorch policy produces parameters for continuous Beta distributions. Training samples power and angle, while deterministic viewing uses their means. Exported architecture diagrams show the network outputs; sampling happens outside the exported graph.
Workers collect shots with unchanged weights, stable result ordering, and per-shot seeds before the parent performs an update. Experiment records include environment settings and initial and final evaluation on held-out wind seeds.
Execution is different from learned skill
The README does not supply a successful trained policy. A short smoke run checks that training executes; it does not establish improved shooting. Weight heatmaps show parameter values, not evidence of competence.
Each training invocation starts fresh and saves the final network. There is no automatic best-checkpoint selection or resume mode, and existing output names are refused to protect earlier results.
Inspect reward and evaluation together
The repository provides training curves, architecture diagrams, weight plots, and saved-model evaluation commands. Its learning guide compares the continuous shot with the discrete-action lunar study and explains the mathematical differences.
Sources and further reading
Based on the linked project documentation, reviewed on 2 November 2026. Capabilities and limitations describe that documented version.
View repository