ボクセル生物 / EvoGym-inspired
体の形と動かし方を、一緒に進化させる。
最初の実験 / Try it
「進化を開始」で、移動距離の大きい個体を親にして世代交代します。上段は最初の世代の最優秀個体、下段はこれまでの最優秀個体です。色は素材を表し、橙は横に伸縮する筋肉、紫は縦に伸縮する筋肉です。転がる・這う・跳ねるなど、右に進めれば選ばれます。歩行姿勢を指定するルールはありません。
Start evolution to select creatures that travel farther to the right. Compare the first-generation champion above with the best-so-far below. Orange muscles contract horizontally; purple muscles vertically. Crawling, rolling or hopping can all succeed; upright walking is not prescribed.
公式EvoGymとの関係 / Relationship to EvoGym
EvoGym(NeurIPS 2021)は、柔らかいボクセルロボットの形態と制御を研究するベンチマークです。公式環境はC++の物理エンジンとPython APIを備え、強化学習(例:PPO)や形態探索、多数の課題に対応します。
このページは、その素材の組み合わせと共進化に着想を得た独自のブラウザ版です。公式シミュレータのWebAssembly移植ではありません。平らな床での移動に限定し、独自のばね物理と、体・ニューラルネット重みを同時に探索する遺伝的アルゴリズムを使います。PPO、公式の課題、学習済みモデル、性能スコアとの互換性はありません。
This educational browser adaptation is inspired by Evolution Gym (NeurIPS 2021), not a port of its official engine. It uses custom spring physics and a genetic algorithm for joint body/controller search on flat ground. It does not implement PPO or the official tasks, and is not compatible with official policies, robot files or benchmark scores.
体と脳 / Body and controller
体は5×5の格子。空白・硬い素材・柔らかい素材・横筋肉・縦筋肉を配置します。辺で連結した4個以上のセルと、筋肉1個以上が必要です。各セルの四隅を質点、辺と対角線をばねにし、隣接セルの角と辺を共有します。硬い素材も有限のばね剛性を持つ近似です。
脳は8入力→8隠れユニット→25出力、297個の重み・バイアスを持つtanhネットです。入力は1 Hzの時計(sin/cos)、重心速度2成分、体の横辺の平均方向2成分、接地割合、重心高さです。出力を筋肉の自然長0.7〜1.3倍に変換し、共有される筋肉辺は指令を平均します。空白や受動セルの出力は使いません。30 Hzで制御し、物理更新は240 Hzです。
A connected 5×5 voxel grid uses shared corner masses, edge springs and diagonal braces. The controller is an 8→8→25 tanh network with 297 parameters: clock, center velocity, average horizontal edge orientation, ground contact and height inputs. Muscle rest lengths range from 0.7 to 1.3. Control runs at 30 Hz, physics at 240 Hz.
評価と世代交代 / Evaluation and evolution
各試行は静止配置で1秒間落ち着かせた後、6秒間の重心の右向き移動距離を測ります。単位は1ボクセル幅で、身体幅で割りません。世代内の上位2個体を保持し、3個体のトーナメント選択と重みの突然変異で子を作ります。交叉は行いません。「体も進化」が有効な場合、子ごとに55%の確率でランダムな1セルの素材変更を試し、連結条件を満たす変更だけ採用します。無効な変更や同じ素材を選んだ場合は形が変わりません。
平均値は物理的に有効な個体だけを対象にします。体の反転・大きな自己貫通・数値発散は失敗とし選択上の評価を−100にします。最優秀個体として保存・再生はしません。改善は毎世代保証されません。成績グラフは直近500世代です。
After one second of passive settling, fitness is six-second rightward center-of-mass displacement in voxel units. Two elites survive; tournament selection and mutation create offspring, without crossover. Optional morphology mutation attempts one material change with 55% probability per child, preserving connectivity. Invalid physics receives −100 for selection and is excluded from the plotted mean. Improvement is not guaranteed each generation.
限界と負荷 / Limits and performance
床との摩擦と重力を扱う簡易シミュレーションです。複雑な接触解法はなく、セルの反転や0.06単位を超える自己貫通を検知した個体は失敗として扱います。検査は制御更新ごとで、微小な貫通を完全には防ぎません。エネルギー効率、生命の代謝、繁殖、生物進化の現実的再現は目的にしていません。
評価はCPUのWeb Workerで行います。長い評価や継続的な高負荷では停止し、画面を隠すと未完了の世代を中断します。集団サイズ12から試すと負荷を抑えられます。再生の描画速度と評価の物理時間は分離しています。
This simplified gravity/friction simulation rejects detected cell inversions and self-penetration over 0.06 units instead of resolving full self-contact. Small penetrations remain possible. There is no metabolic or energy-efficiency objective. Worker evaluation has load limits, and hiding the page cancels unfinished work. Use population 12 on slower devices.
保存・読み込み / Sharing
JSONに体と脳、物理バージョンを保存します。読み込んだ個体は同じ開始姿勢から試行し、保存された成績を信用せず端末で再評価します。「進化を開始」で、その個体を親とする新しい探索を開始できます。過去の集団や途中の姿勢を復元する機能ではありません。異なるブラウザでは浮動小数点計算により長期的に微差が生じる場合があります。データはサーバーへ送信しません。
JSON stores the body, brain and physics version. Import re-evaluates the creature locally from the standard start, and seeds a new population. It does not restore a full population or an in-flight pose. Small cross-browser numerical differences are possible. No creature data is uploaded.
参考・ライセンス / References and licensing
- Bhatia et al., Evolution Gym: A Large-Scale Benchmark for Evolving Soft Robots (NeurIPS 2021)
- Official EvoGym repository
- 利用箇所・改変内容 / Adaptation notices · EvoGym MIT license · Original software MIT license
筋肉が共有する辺の指令平均化は公式実装を参照してJavaScriptへ翻案しています。その他の簡易物理、GA、UI、進化例は本サイト用に作成。公式プロジェクトによる提供・監修・推奨を意味しません。