thibo73800 / metacar Goto Github PK
View Code? Open in Web Editor NEWA reinforcement learning environment for self-driving cars in the browser.
Home Page: https://www.metacar-project.com/
A reinforcement learning environment for self-driving cars in the browser.
Home Page: https://www.metacar-project.com/
Should take an object as parameters and return an object with the lidar state and additional informations about the current state of the car (speed, acc...)
Q Learning: to polish
Hello,
I'm working on a python project with Reinforcement Learning, and I found the Metacar project very useful..
The thing is that I'm still new to this domain, and I don't know javascript.
So how would I import this environment to my Python IDE?
Any help would be great
I want to know if anyone has used metacar to simulate the prevention of multiple car collisions? Or have an implemented code?
Currently, Metacar requires you to have script tag in html to import Pixi.js dependency
<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.7.1/pixi.min.js"></script>
I tried removing it and npm installing pixi.js package, but Metacar did not work:
metacar.min.js:1 Uncaught TypeError: Cannot read property 'Application' of undefined
Need to be able to install Pixi.js from npm.
Remove useless event
See asynchrone for the training for Q learning and Policy
env.reset() must also reset others cars.
Link to code example here is wrong. It should be https://github.com/thibo73800/metacar/blob/master/demo/webapp/public/js/policy_monte_carlo/policy_agent.js
.
The dist version of the module metacar.min.js
looks like this:
window.metacar=function(t) {
This can be easily solved by changing the libraryTarget
in webpack.config.js
var packageConfig = Object.assign({}, config, {
output: {
filename: 'metacar.min.js',
path: path.resolve(__dirname, './dist'),
library: 'metacar',
libraryTarget: 'window',
From libraryTarget: 'window'
to libraryTarget: 'commonjs'
. Having window object as a target is a problem because for example it is not accessible from Web Workers.
However, there is still another issue: Pixi.js. First of all, it's in externals it really should be bundled with the module. Second of all, Metacar tries to use pixi during the import. Is pixi just used for rendering or is it core part of the game? If it is used just for rendering this problem can be solved be having two separate modes: 1. Simulations 2. Rendering. During the simulation rendering libraries should not be touched. If Pixi lies in the core of the the simulation, you can use jsdom + canvas, node-pixi, or pixi-shim to prevent it from accessing DOM during stimulation. more info: pixijs/pixijs#4771
Refactor ui_event.ts
Randomly generating new tracks
How to stop the agent whenever it's path is blocked or let it just simply follow other vehicles instead of changing lanes? I tried various things but nothing is reflecting while training.
Configure other cars with an Object
{
moving: false|true,
speed: mph
}
Make a conversion between mph and map pixel.
Solve the Full control environment with DDPG
https://metacar-project.com/level2.html
Refactor bot_control_motion.ts
API: carsMoving(true|false)
Review the default reward architecture
$ curl https://metacar-project.com/docs/modules/_index_.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /docs/modules/_index_.html</pre>
</body>
</html>
Set a custom reward function
If a car is blocked, then continu to an other free direction instead of waiting.
Hi, if Pixi and TFJS were locally installed it would allow offline testing.
ControlMotion: Add an object to configure the motion
If the user canceled the training, the environment is not render anymore.
https://metacar-project.com/level0.html
https://metacar-project.com/level1.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.