0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

自動運転シミュレーション その3

Last updated at Posted at 2023-10-01

概要

自動運転シミュレーションを開発している。
プラットホームは、Plunker。
言語は、javascript。

仕組み

  • 環境とagentの組み合わせ。
    環境は、閉じたサーキット。

image.png

画面の下にある5つのグレーがセンサーです。
ちなみに、aは、回転角、xyzは、座標です。
image.png

100ミリ秒毎にagentが呼び出されて、アクションを求められます。
その際、センサーの値だけが送られます。

r = agent.get_action(observation, reward, done);
   
observation: [255, 255, 0, 0, 0]
reward: 1.0
done: false

その値でagentがアクションを返します。
アクションは、2が真っ直ぐ、0が右、1が左です。

agentの開発

observationを見て、アクションを返します。
このサンプルには、tesorflow.jsが組み込まれています。

成果物

自動運転シミュレーションは、こちら
ハンドルのアクションを追加しました。

image.png

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?