Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding terms, goals, beliefs and etc... #14

Open
Deadrosas opened this issue Dec 22, 2022 · 2 comments
Open

Adding terms, goals, beliefs and etc... #14

Deadrosas opened this issue Dec 22, 2022 · 2 comments

Comments

@Deadrosas
Copy link

Deadrosas commented Dec 22, 2022

I'm writing code with your implementation and as it stands I have some questions about how everything works.

I want to add path1(list) to the agent.

How can I do it?

Screenshot from 2022-12-22 15-59-57

@Deadrosas
Copy link
Author

Deadrosas commented Dec 22, 2022

The idea is to be able to call the term on the agent code

image

Also, how can I add a plan or any other thing?

@niklasf
Copy link
Owner

niklasf commented Jan 1, 2023

Hi, happy new year!

Here's an example that triggers a plan in the agent from Python: https://github.com/niklasf/python-agentspeak/blob/master/examples/calling-asl/calling-asl.py

Adding a belief is almost the same:

agent.call(
    agentspeak.Trigger.addition,
    agentspeak.GoalType.belief,
    agentspeak.Literal("example", (1, 2)),
    agentspeak.runtime.Intention())

Doing so makes sense for events generated by the envrionment.

If the agent is wants to calculate something using a Python function, something like https://github.com/niklasf/python-agentspeak/blob/1b7f6eb6f34430de193466e0c3c6eebb251bac3f/examples/embedded/embedded.py#L12-L14C2 can be used to register it and return the result via unification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants