2018-06-16 09:21:28 +01:00
2018-06-15 20:47:17 +01:00
2018-06-15 20:47:17 +01:00
2018-06-15 20:47:17 +01:00
2018-06-15 20:47:17 +01:00
2018-06-13 15:59:58 +01:00
2018-06-16 09:21:28 +01:00
2018-06-08 11:32:49 +01:00
2018-06-13 15:59:58 +01:00
2018-06-08 11:32:49 +01:00

Documentation

Table of contents:

  1. Getting Started
  2. Your first environement
  3. Interact with the environement
  4. Other events
  5. Custom your environement
  6. Create your own level

Getting started

Installing Metacar

You can used Metacar with a direct link in your HTML file or installing it from NPM. However, metacar is based on Pixi.js: 4.7.1, then you need to include pixi.js as a global dependencies in your HTML.

Script Tag

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Metacar: Documentation</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.7.1/pixi.min.js"></script>
</head>
<body>
    <script src="https://cdn.jsdelivr.net/npm/metacar@0.0.1/dist/metacar.min.js"></script>
</body>
</html>

Script Tag and npm

npm i metacar
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Metacar: Documentation</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.7.1/pixi.min.js"></script>
</head>
<body>
    <script src="yourscript.js"></script>
</body>
</html>
import Metacar from "metacar";

Your first environement

Even if you can create your own level, Metacar comes up with a set of predefined level accessible under metacar.level. Once your level is selected, you can use it to create a first environement.

// Select a level
const level = metacar.level.level1;
// Create the environement
const env = new metacar.env("env", level);
// Load it
env.load();

You also have to create the container in your HTML file.

<div id="env"></div>

(NOTE: metacar.env can be instanciate with an object or a string for the level parameters: doc API)

Wonderful! You just create your first metacar environement. You can take sometime to play around with the key arrow to move the car. The current collision system support the detection of the following events:

  • Collisions with other vehicles
  • Detection of the road, ground and road with the lidar
  • Detection of the car going out track

If you want to see add features to the detection system you can considere contributing to the project :)

Interact with the environement

Create your first event

Train your agent

Other events

event1

Description

event2

Description

Custom event

Custom event description

Custom your environement

Custom your environement

S
Description
A reinforcement learning environment for self-driving cars in the browser.
Readme
982 KiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 99.2%
JavaScript 0.8%