Skip to content

Add ability to pass agents to python #2

@LaCuneta

Description

@LaCuneta

I think they should be represented as dict-like objects, where keys are agent variables.

For a first pass, they should be read-only.

One tricky thing is keeping them in sync with NetLogo. For instance:

py:set "t" turtle 0
ask turtle 0 [ set color red ]
print py:runresult "t['color']" ;; This will be out of date

I think just not caring is good enough for a first pass, as long as it's clear in the docs. Otherwise, we'd have to track and sync all agent-objects on every call, which sounds awful.

I think they should be represented as dict-like objects, where keys are agent variables.

For a first pass, they should be read-only.

One tricky thing is keeping them in sync with NetLogo. For instance:

py:set "t" turtle 0
ask turtle 0 [ set color red ]
print py:runresult "t['color']" ;; This will be out of date

I think just not caring is good enough for a first pass, as long as it's clear in the docs. Otherwise, we'd have to track and sync all agent-objects on every call, which sounds awful.

Copied from qiemem/PythonExtension#2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions