Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SPADE-BDI
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
serfrape
SPADE-BDI
Commits
013d3b92
Commit
013d3b92
authored
Mar 28, 2019
by
serfrape
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow receival of predicates without args (values)
parent
00928232
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
bdi.py
spade_bdi/bdi.py
+7
-1
No files found.
spade_bdi/bdi.py
View file @
013d3b92
...
...
@@ -10,6 +10,7 @@ from spade.agent import Agent
from
spade.template
import
Template
from
spade.message
import
Message
import
json
from
ast
import
literal_eval
PERCEPT_TAG
=
frozenset
(
[
pyson
.
Literal
(
"source"
,
(
pyson
.
Literal
(
"percept"
),
))])
...
...
@@ -180,8 +181,13 @@ class BDIAgent(Agent):
raise
pyson
.
PysonError
(
"unknown illocutionary force:
%
s"
%
ilf_type
)
intention
=
pyson
.
runtime
.
Intention
()
args
=
literal_eval
(
received
[
"args"
])
if
args
!=
tuple
():
message
=
pyson
.
Literal
(
received
[
"functor"
],
tuple
([
received
[
"args"
]]))
received
[
"functor"
],
args
)
else
:
message
=
pyson
.
Literal
(
received
[
"functor"
])
message
=
pyson
.
freeze
(
message
,
intention
.
scope
,
{})
tagged_message
=
message
.
with_annotation
(
pyson
.
Literal
(
"source"
,
(
pyson
.
Literal
(
str
(
msg
.
sender
)),
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment