Skip to main content

ActionGraph

ActionGraph is a symbolic AI agent for generating action plans based on preconditions and effects. This is loosely based on STRIPS approach (https://en.wikipedia.org/wiki/Stanford_Research_Institute_Problem_Solver). State variables are modeled as nodes; the actions represent edges/transitions from one state to another. Dijikstra's shortest path algorithm (A* but without the heuristic cost estimate) is used to generate a feasible, lowest cost plan.

Source: https://github.com/bharathra/ACTION_GRAPH

Usage:


from action_graph.agent import Agent
from action_graph.action import Action


class Drive(Action):
    effects = {"driving": True}
    preconditions = {"has_drivers_license": True, "tank_has_gas": True}


class FillGas(Action):
    effects = {"tank_has_gas": True}
    preconditions = {"has_car": True}


class RentCar(Action):
    effects = {"has_car": True}

    cost = 100  # dollars


class BuyCar(Action):
    effects = {"has_car": True}
    preconditions = {}

    cost = 10_000  # dollars


if __name__ == "__main__":
    world_state = {"has_car": False, "has_drivers_license": True}
    goal_state = {"driving": True}

    ai = Agent()

    actions = [a(ai) for a in Action.__subclasses__()]
    ai.load_actions(actions)

    print("Initial State:", world_state)
    ai.update_state(world_state)

    print("Goal State:   ", goal_state)
    plan = ai.get_plan(goal_state)

    # ai.execute_plan(plan)

Metadata

Release files for action-graph 1.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for action-graph 1.3.5
File Size Uploaded Provenance
action-graph-1.3.5.tar.gz 8.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for action-graph 1.3.5
File Interpreter ABI Platform
action_graph-1.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / action-graph-1.3.5.tar.gz

Download URL action-graph-1.3.5.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
80341d5afc49a204c82e860733002444539fb47568b3c367fe98043bb7778bbe
BLAKE2b-256 checksum
How to use checksums
1fc100827cbc8e5328931241edaa186b38a75894b8e12b08f0864692fac20204
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / action_graph-1.3.5-py3-none-any.whl

Download URL action_graph-1.3.5-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2f32998a75601ca108845dbf4019c64acb3ffff6fa9cc583a0f32e16588d1ee
BLAKE2b-256 checksum
How to use checksums
79001ae916475a29a7fc1da63bbf7e1bb7e0c3108351fd179dc9c92a530188cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Security for action-graph 1.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page