• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

devendrachaplot/Neural-Localization: Train an RL agent to localize actively (PyT ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

devendrachaplot/Neural-Localization

开源软件地址(OpenSource Url):

https://github.com/devendrachaplot/Neural-Localization

开源编程语言(OpenSource Language):

Python 100.0%

开源软件介绍(OpenSource Introduction):

Active Neural Localization

This is a PyTorch implementation of the ICLR-18 paper:

Active Neural Localization
Devendra Singh Chaplot, Emilio Parisotto, Ruslan Salakhutdinov
Carnegie Mellon University

Project Website: https://devendrachaplot.github.io/projects/Neural-Localization

This repository contains:

  • Code for the Maze2D Environment which generates random 2D mazes for active localization.
  • Code for training an Active Neural Localization agent in Maze2D Environment using A3C.

Dependencies

Usage

Training

For training an Active Neural Localization A3C agent with 16 threads on 7x7 mazes with maximum episode length 30:

python a3c_main.py --num-processes 16 --map-size 7 --max-episode-length 30 --dump-location ./saved/ --test-data ./test_data/m7_n1000.npy

The code will save the best model at ./saved/model_best and the training log at ./saved/train.log. The code uses ./test_data/m7_n1000.npy as the test data and makes sure that any maze in the test data is not used while training.

Evaluation

After training, the model can be evaluated using:

python a3c_main.py --num-processes 0 --evaluate 1 --map-size 7 --max-episode-length 30 --load ./saved/model_best --test-data ./test_data/m7_n1000.npy

Pre-trained models

The pretrained_models directory contains pre-trained models for map-size 7 (max-episode-length 15 and 30), map-size 15 (max-episode-length 20 and 40) and map-size 21 (max-episode-length 30 and 60). The test data used for training these models is provided in the test_data directory.

For evaluating a pre-trained model on maze size 15x15 with maximum episode length 40:

python a3c_main.py --num-processes 0 --evaluate 1 --map-size 15 --max-episode-length 40 --load ./pretrained_models/m15_l40 --test-data ./test_data/m15_n1000.npy

Generating test data

The repository contains test data of map-sizes 7, 15 and 21 with 1000 mazes each in the test_data directory.

For generating more test data:

python generate_test_data.py --map-size 7 --num-mazes 100 --test-data-location ./test_data/ --test-data-filename my_new_test_data.npy

This will generate a test data file at test_data/my_new_test_data.npy containing 100 7x7 mazes.

All arguments

All arguments for a3c_main.py:

  -h, --help            show this help message and exit
  -l L, --max-episode-length L
                        maximum length of an episode (default: 30)
  -m MAP_SIZE, --map-size MAP_SIZE
                        m: Size of the maze m x m (default: 7), must be an odd
                        natural number
  --lr LR               learning rate (default: 0.001)
  --num-iters NS        number of training iterations per training thread
                        (default: 10000000)
  --gamma G             discount factor for rewards (default: 0.99)
  --tau T               parameter for GAE (default: 1.00)
  --seed S              random seed (default: 1)
  -n N, --num-processes N
                        how many training processes to use (default: 8)
  --num-steps NS        number of forward steps in A3C (default: 20)
  --hist-size HIST_SIZE
                        action history size (default: 5)
  --load LOAD           model path to load, 0 to not reload (default: 0)
  -e EVALUATE, --evaluate EVALUATE
                        0:Train, 1:Evaluate on test data (default: 0)
  -d DUMP_LOCATION, --dump-location DUMP_LOCATION
                        path to dump models and log (default: ./saved/)
  -td TEST_DATA, --test-data TEST_DATA
                        Test data filepath (default: ./test_data/m7_n1000.npy)

Cite as

Chaplot, Devendra Singh, Parisotto, Emilio and Salakhutdinov, Ruslan. Active Neural Localization. In International Conference on Learning Representations, 2018. (PDF)

Bibtex:

@inproceedings{chaplot2018active,
  title={Active Neural Localization},
  author={Chaplot, Devendra Singh and Parisotto, Emilio and Salakhutdinov, Ruslan},
  booktitle={International Conference on Learning Representations},
  year={2018}
}

Acknowledgements

The implementation of A3C is borrowed from https://github.com/ikostrikov/pytorch-a3c.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap