HomeRobotics & KinematicsPlanar Arm Reaching: Cross-Entropy Method in 2 DOF

Planar Arm Reaching: Cross-Entropy Method in 2 DOF (2D)

Interactive 2D companion to the 3-joint CEM reaching simulator: instead of flattening the 3D scene, this is a genuinely 2-DOF planar arm (shoulder + elbow only — a base-yaw joint is meaningless once the arm and target both live in a plane), so the Cross-Entropy Method searches a 2-parameter configuration space instead of 3, and converges measurably faster generation-for-generation on the identical algorithm.

Robotics & Kinematics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-robot-learning-robotics ↗ Open standalone

This is the 2D companion to the 3-joint CEM reaching simulator, and it is a genuine dimensional reduction rather than a flattened copy of the 3D scene: a real 2-DOF planar robot arm has no base-yaw joint at all, because once the arm and the target both live in the same plane there is nothing left for an out-of-plane rotation to do. So this arm has exactly two joints — shoulder and elbow — and the Cross-Entropy Method optimizes a 2-parameter policy instead of 3, sampling a population of joint-angle pairs each generation from a Gaussian, scoring them by end-effector distance to the target through the plane's own forward-kinematics equations, keeping the elite fraction, and re-fitting the search distribution's mean and spread. Watch the population of grey ghost arms narrow generation by generation as the blue "current policy" arm walks itself onto the target — and because the search space is smaller, it typically gets there faster than its 3-joint counterpart under the same population and elite settings, a difference confirmed numerically rather than just claimed.

⚙ Under the hood

The 2D companion to the 3-joint CEM reaching simulator: a genuinely 2-DOF planar arm (shoulder + elbow only, since a base-yaw joint has nothing to do once the arm and target share a plane) whose Cross-Entropy Method search over just 2 parameters converges measurably faster than the 3-parameter search on the same algorithm, verified with a standalone numerical replay.

robot learningreinforcement learningpolicy searchcross-entropy methodoptimizationkinematics2D

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)