Code Monkey home page Code Monkey logo

asnet-ip's Introduction

ASNets Actions Status License: GPL v3

This repository aims to reimplement the code used in the AAAI'18 paper Action Schema Networks: Generalised Policies with Deep Learning and further described in the article ASNets: Deep Learning for Generalised Planning.

MDP-IP

We also aim to make ASNets compatible with problems with imprecise probabilities, consequentially needing to implement a teacher planner able to work on such domain types.

For such, we aim to implement a planner such as described in Efficient solutions to factored MDPs with imprecise transition probabilities.

Installation

You may install this repository as a package locally with the following command:

pip install git+https://github.com/AndreMoukarzel/asnet-ip.git

If you have already cloned the repository, you may also install your local clone as a package with:

cd asnet-ip
python install -e .

Structure

This repository is structured as follows:

  • asnet/ contains our implementation of ASNets, and all auxiliary code used in their construction and training.
  • problems/ includes all problems that we used to train + test the network.

Execution

If you are trying to use this package directly, it may be useful to generate problem instances as described here in order to create the testing problems used by default by the scripts.

Some classes from the package can be executed by calling them directly. In this cases, instructions for each are as below:

ASNet

Executing this class by itself will simply try to instantiate an ASNet for the given domain and problem instance. Can be a good way to test if your domain or problem is correctly defined.

cd asnet-ip
python -B -m asnet.asnet

Multiple arguments are available when running the asnet class:

  • --domain/-d: Specify different problem domain.
  • --problem/-p: Specify different problem instance.
  • --layer_num/-l: Number of layers in the ASNet.
  • --image_name/-img: Specify save path to save image representing the ASNet's structure.
  • --debug: Turns on debug prints.

Below is a demonstration of the usage of multiple arguments.

cd asnet-ip
python -B -m asnet.asnet -d problems/deterministic_blocksworld/domain.pddl -p problems/deterministic_blocksworld/pb6.pddl --image_name asnet.jpg

Trainer

Executing this class by itself will train an ASNet for the given domain in multiple problem instances. It takes a while. The weights and biases of the network are saved to the data/ folder after training.

cd asnet-ip
python -B -m asnet.trainer

Such as with the execution of the ASNet's class, optional arguments may be specified for personalization of the execution.

For details on available arguments use --help such as demonstrated below:

cd asnet-ip
python -B -m asnet.trainer --help

Heuristics

Analogously, the heuristics can be also executed on specific problem instances by being referenced with the python -B -m command, but with consideration of such files being inside the heuristics/ subfolder. Therefore, the heuristics can be run as follows:

cd asnet-ip
python -B -m asnet.heuristics.lm_cut
python -B -m asnet.heuristics.hmax

asnet-ip's People

Contributors

andremoukarzel avatar

Watchers

 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.