Giter Site home page Giter Site logo

smart_mantsinen's Introduction

Smart Mantsinen (work in progress)

Requirements

  1. Python 3.8 or higher
  2. Mevea Simulation Software (Modeller and Solver)
  3. Mantsinen Model
  4. Playback files in .ob format

Installation

  1. Clone the repository:
git clone https://github.com/mizolotu/SmartMantsinen
  1. From SmartMantsinen directory, install required python packages (it is obviously recommended to create a new virtualenv and install everything there):
python -m pip install -r requirements.txt
  1. Open Mevea Modeller and load Mantsinen Model. Go to Scripting -> Scripts, create a new script object, select env_backend.py from SmartMantsinen directory as the file name in the object view. Go to I/O -> Inputs -> AI_Machine_Bus_Aux1_RPDO1_u16Y49_BoomLc (or any other input component) and select the object just created as the script name.

  2. In terminal, navigate to the Mevea Software resources directory (default: C:\Program Files (x86)\Mevea\Resources\Python\Bin) and install numpy and requests:

python -m pip install numpy requests --no-cache-dir
  1. Open Mevea Solver, go to Settings, and enable automatic start. Close the solver.

  2. Open file config.py, and change path to Mantsinen model. Change other settings if needed.

Preprocessing (Optional)

  1. From SmartMantsinen directory start the server script:
bash python env_server.py
  1. Replay .ob file to record the trajectory data into .csv:
python process_trajectory.py -o <output_file>
  1. Find minimum and maximum data values for output and reward signals:
python standardize_data.py

Training

  1. From SmartMantsinen directory start the server script, if it has not yet been started:
python env_server.py
  1. Start or continue training the PPO agent:
python train_ppo.py

Postprocessing

  1. Plot reward evolution:
python plot_results.py
  1. Demonstrate the policy trained:
python demonstrate_ppo.py -w <text file with waypoints> -c <first, last or best>

The first checkpoint corresponds to the model pretrained with supervised learning.

Results

Model evaluation:

smart_mantsinen's People

Contributors

mizolotu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.