GithubHelp home page GithubHelp logo

cschen1205 / java-ai-minefield-navigator Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 803 KB

Package provides java implementation of a multi-agent learning simulator based on FALCON ANN and RL

License: MIT License

Shell 6.59% Batchfile 5.09% Java 88.32%
adaptive-resonance-theory agent-based-simulation intelligent-agent reinforcement-learning neural-network

java-ai-minefield-navigator's Introduction

java-ai-minefield-navigator

Package provides java implementation of a multi-agent learning simulator based on FALCON ANN and RL

Introduction

TD-FALCON is a fusion architecture that incorporates temporal difference methods and self-organizing neural networks for reinforcement learning with delayed rewards. It learns by creating cognitive codes across sensory input, actions, and rewards.

The implementation of TD-FALCON can be found in the minefield navigation simulator in this java project, alongside with its reactive version R-FALCON, and a backpropagation network based Q-learning system.

Install

Add the following dependency to your POM file:

<dependency>
  <groupId>com.github.cschen1205</groupId>
  <artifactId>java-ai-minefield-navigator</artifactId>
  <version>1.0.2</version>
</dependency>

Usage: Invoke GUI-based Simulator

The sample code below shows how to invoke the Q-Learn TD-FALCON MineField Navigator GUI:

public static void main(String[] args) {
    MineFieldSimulatorConfig config = new MineFieldSimulatorConfig();
    config.setImmediateRewardProvided(true);
    config.setNumAgents(1);
    
    FalconConfig falconConfig = new FalconConfig();
    falconConfig.numAction = FalconNavAgent.numAction;
    falconConfig.numState = config.numState();
    falconConfig.numReward = 2;
    
    MineFieldSimulatorGUI gui = new MineFieldSimulatorGUI(config, falconConfig);
}

Usage: Invoke Command-line based Simulator

The sample code below shows show to run the TD-FALCON MineField Navigator simulation in console mode:

public static void main(String[] args) {
    MineFieldSimulatorConfig config = new MineFieldSimulatorConfig();
    config.setImmediateRewardProvided(false);
    config.setNumRuns(1);
    config.setMaxTrial(300);
    
    
    FalconConfig falconConfig = new FalconConfig();
    falconConfig.numAction = FalconNavAgent.numAction;
    falconConfig.numState = config.numState();
    falconConfig.numReward = 2;
    falconConfig.isBounded = false;
    
    
    MineFieldSimulator simulator = new MineFieldSimulatorQ(config, falconConfig);
    simulator.runSims();
}

The above codes invoke the Q-Learn TD-FALCON simulator, to switch to other learning paradigms, change the

"MineFieldSimulatorQ" to one of the following:

  • MineFieldSimulatorSARSA: state-action-reward-state-action
  • MineFieldSimulatorQLambda: Q-Learning with lambda trails
  • MineFieldSimulatorSARSALambda: SARSA with lambda trails
  • MineFieldSimulatorR: R-Learning

java-ai-minefield-navigator's People

Contributors

cschen1205 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

chewkokwah

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.