项目作者: raminmh

项目描述 :
Code repo for paper: ICML 2020 paper Natural lottery ticket winner: RL for ordinary neural circuits
高级语言: Python
项目地址: git://github.com/raminmh/ordinary-neural-circuits.git
创建时间: 2020-04-10T13:34:09Z
项目社区:https://github.com/raminmh/ordinary-neural-circuits

开源协议:

下载


Ordinary Neural Circuits

How to get it working:

  • First you need to install the Reinforcement Learning environments: Open-AI Gym Roboschool and mujoco-py
  • Next you need to compile the pybnn library (simulates neural circuits using C++) and copy the shared object to each of the local working directories. You have to install python-boost:
    1. sudo apt-get install libboost-python-dev
    and then compile and copy the library:
    1. cd pybnn
    2. make
    3. cp bin/pybnn.so ../invpend_roboschool/
    4. cp bin/pybnn.so ../mountaincar_gym/
    5. cp bin/pybnn.so ../half_cheetah/
    6. cp bin/pybnn.so ../parking/

Verifying

To check if the toolchain is working as intended you can execute a learned neuronal policy:

  1. cd twmountaincar/
  2. python3 twmountaincar.py --file tw-optimized.bnn

or

  1. cd invpend_roboschool/
  2. python3 twcenterpend.py --file tw-optimized.bnn

or

  1. cd half_cheetah/
  2. python3 half_cheetah.py --file tw-optimized.bnn

Note: You need to cd into the particular directories because the library and the optimized policy parameters are loaded from relative paths of the working directory.

Parking

To get the deterministic parking environment working you have to compile the rover simulator:

  1. cd parking/park_gym/
  2. make
  3. cp bin/pyparkgym.so ../
  4. cd ..

Random circuits

To generate random circuits that have the same size as the TW circuit run

  1. cd generate_circuits/
  2. python3 generate_circuit.py

Other NN architectures (MLP, LSTM)

To train a MLP or LSTM on the tasks by our Adaptive Random Search run

  1. cd other_nn_architectures/
  2. python3 nn_run_env.py --env [invpend|cheetah|mountaincar]