All Projects → leopepe → Goapy

leopepe / Goapy

Licence: bsd-2-clause
Goal-Oriented Action Planning implementation in Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Goapy

Autoscraper
A Smart, Automatic, Fast and Lightweight Web Scraper for Python
Stars: ✭ 4,077 (+12254.55%)
Mutual labels:  automation, artificial-intelligence, ai
Construct
JavaScript Digital Organisms simulator
Stars: ✭ 17 (-48.48%)
Mutual labels:  artificial-intelligence, ai
Awesome Ai Ml Dl
Awesome Artificial Intelligence, Machine Learning and Deep Learning as we learn it. Study notes and a curated list of awesome resources of such topics.
Stars: ✭ 831 (+2418.18%)
Mutual labels:  artificial-intelligence, ai
Sliding puzzle
Swift implementation of the Sliding Puzzle game with Iterative Deepening A* AI Solver.
Stars: ✭ 25 (-24.24%)
Mutual labels:  artificial-intelligence, ai
Basic reinforcement learning
An introductory series to Reinforcement Learning (RL) with comprehensive step-by-step tutorials.
Stars: ✭ 826 (+2403.03%)
Mutual labels:  artificial-intelligence, ai
Pygame Learning Environment
PyGame Learning Environment (PLE) -- Reinforcement Learning Environment in Python.
Stars: ✭ 828 (+2409.09%)
Mutual labels:  artificial-intelligence, ai
Tetrisai
The old school Tetris game in addition with an AI that learns evolutionary how to play this game
Stars: ✭ 22 (-33.33%)
Mutual labels:  artificial-intelligence, ai
Carla
Open-source simulator for autonomous driving research.
Stars: ✭ 7,012 (+21148.48%)
Mutual labels:  artificial-intelligence, ai
Autodl
Automated Deep Learning without ANY human intervention. 1'st Solution for AutoDL [email protected]
Stars: ✭ 854 (+2487.88%)
Mutual labels:  artificial-intelligence, ai
Awesome Ai Books
Some awesome AI related books and pdfs for learning and downloading, also apply some playground models for learning
Stars: ✭ 855 (+2490.91%)
Mutual labels:  artificial-intelligence, ai
Machine Learning Open Source
Monthly Series - Machine Learning Top 10 Open Source Projects
Stars: ✭ 943 (+2757.58%)
Mutual labels:  artificial-intelligence, ai
Gans In Action
Companion repository to GANs in Action: Deep learning with Generative Adversarial Networks
Stars: ✭ 748 (+2166.67%)
Mutual labels:  artificial-intelligence, ai
Awesome Artificial Intelligence
A curated list of Artificial Intelligence (AI) courses, books, video lectures and papers.
Stars: ✭ 6,516 (+19645.45%)
Mutual labels:  artificial-intelligence, ai
Redtail
Perception and AI components for autonomous mobile robotics.
Stars: ✭ 832 (+2421.21%)
Mutual labels:  artificial-intelligence, ai
Fairlearn
A Python package to assess and improve fairness of machine learning models.
Stars: ✭ 723 (+2090.91%)
Mutual labels:  artificial-intelligence, ai
Riceteacatpanda
repo with challenge material for riceteacatpanda (2020)
Stars: ✭ 18 (-45.45%)
Mutual labels:  artificial-intelligence, ai
Openkore
A free/open source client and automation tool for Ragnarok Online
Stars: ✭ 956 (+2796.97%)
Mutual labels:  automation, ai
Ffdl
Fabric for Deep Learning (FfDL, pronounced fiddle) is a Deep Learning Platform offering TensorFlow, Caffe, PyTorch etc. as a Service on Kubernetes
Stars: ✭ 640 (+1839.39%)
Mutual labels:  artificial-intelligence, ai
Hyperparameter hunter
Easy hyperparameter optimization and automatic result saving across machine learning algorithms and libraries
Stars: ✭ 648 (+1863.64%)
Mutual labels:  artificial-intelligence, ai
Machine Learning Experiments
🤖 Interactive Machine Learning experiments: 🏋️models training + 🎨models demo
Stars: ✭ 841 (+2448.48%)
Mutual labels:  artificial-intelligence, ai

GOAPy

Build Status Coverage Status PyPI version

Version: 0.2.0

GOAPy

Goal-Oriented Action Planning (GOAP) implementation in Python

Introduction

GOAP is a real-time planning algorithm for autonomous agents (AA). AA are able to create an action planning based on a set of actions available to the AA.

The Planner class searches for the correct set of actions from an initial state to it' goal. To perform the search the planner sets a graph using the possible world states as nodes and the available actions as edges of the graph. To search for the shortest path it uses the A* algorithm.

Usage

Using the AutomatonController class

From the AutomatonController class perspective the usage and interaction should be:

from Goap.Action import Actions
from Goap.Sensor import Sensors
from Goap.Automaton import AutomatonController


def setup_sensors():
    """ Setup your automaton sensors.
        The sensors are a collection of linux shell commads or python callables (functons or objects)
    """
    sensors = Sensors()
    # add a shell sensor that will check if a directory exist and returns a string with
    # "exists" or "not_exist"
    # The return string will update the automaton's world state
    sensors.add(
        name='SenseTmpDirState',
        shell='if [ -d "/tmp/goap_tmp" ]; then echo -n "exist"; else echo -n "not_exist"; fi',
        binding='tmp_dir_state'
    )
    sensors.add(
        name='SenseTmpDirContent',
        shell='[ -f /tmp/goap_tmp/.token ] && echo -n "token_found" || echo -n "token_not_found"',
        binding='tmp_dir_content'
    )
    return sensors


def setup_actions():
    actions = Actions()
    actions.add(
        name='CreateTmpDir',
        pre_conditions={'tmp_dir_state': 'not_exist', 'tmp_dir_content': 'token_not_found'},
        effects={'tmp_dir_state': 'exist', 'tmp_dir_content': 'token_not_found'},
        shell='mkdir -p /tmp/goap_tmp'
    )
    actions.add(
        name='CreateToken',
        pre_conditions={'tmp_dir_state': 'exist', 'tmp_dir_content': 'token_not_found'},
        effects={'tmp_dir_state': 'exist', 'tmp_dir_content': 'token_found'},
        shell='touch /tmp/goap_tmp/.token'
    )
    return actions


def setup_automaton():
    world_state_matrix = {
        "tmp_dir_state": 'Unknown',
        "tmp_dir_content": 'Unknown',
    }
    automaton = AutomatonController(
        name='directory_watcher',
        actions=setup_actions(),
        sensors=setup_sensors(),
        world_state=world_state_matrix
    )
    return automaton


def main():
    goal = {
        "tmp_dir_state": "exist",
        "tmp_dir_content": "token_found",
    }
    dir_handler = setup_automaton()
    dir_handler.goal = goal
    dir_handler.start()


if __name__ == '__main__':
    main()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].