NetLogo / NetLogo/Python-Extension
Add ability to pass agents to python
Nessuno ha ancora preso questa issue.
- Lingua principale
- Scala
- Stelle
- 31
- Fork
- 16
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non vengono indicati file o test. Inizia tracciando il comportamento esistente di py:set e py:runresult, quindi definisci come le variabili degli agenti diventano oggetti Python di sola lettura simili a dict. Il lavoro è completato quando gli agenti possono essere passati a Python e la documentazione dichiara chiaramente che i valori possono diventare obsoleti dopo modifiche in NetLogo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, scala
- Ambito
- api
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100