NetLogo / NetLogo/Python-Extension
Add ability to pass agents to python
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Scala
- Sterne
- 31
- Forks
- 16
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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 https://github.com/qiemem/PythonExtension/issues/2
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Es werden keine Dateien oder Tests genannt. Beginne damit, das bestehende Verhalten von py:set und py:runresult nachzuverfolgen, und lege dann fest, wie Agentenvariablen zu schreibgeschützten, dict-ähnlichen Python-Objekten werden. Als erledigt gilt die Aufgabe, wenn Agenten an Python übergeben werden können und die Dokumentation klar festhält, dass Werte nach Änderungen in NetLogo veraltet sein können.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, scala
- Bereich
- api
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100