Add ability to pass agents to python
還沒有人認領這個 Issue。
評估
研究方向
未指定檔案或測試。先追蹤現有的 py:set 和 py:runresult 行為,然後定義 agent 變數如何成為唯讀的類 dict Python 物件。完成的標準是可以將 agent 傳遞給 Python,且文件清楚說明值可能會在 NetLogo 變更後變得過時。
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- Scala
- 星號
- 31
- 分支
- 16
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NetLogo/Python-Extension 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 25/100
NetLogo/Python-Extension#27 · 3 則留言 ·
-
難度 4/5 3-5 天 新手友好度 35/100
NetLogo/Python-Extension#24 · 2 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 35/100
NetLogo/Python-Extension#17 ·
-
難度 5/5 一週以上 新手友好度 25/100
NetLogo/Python-Extension#16 · 6 則留言 ·
-
難度 3/5 1-2 天 新手友好度 25/100
查看 NetLogo/Python-Extension 的全部 Issue
相似的 Issue
-
Area: Excel support
難度 2/5 1-3 小時 新手友好度 75/100
orbeon/orbeon-forms#7893 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
lichess-org/lila#21788 · 2 則留言 ·
-
area:Iceberg area:writer documentation requires-triage
難度 2/5 1-3 小時 新手友好度 75/100
apache/datafusion-comet#6147 ·
-
feature
難度 2/5 1-3 小時 新手友好度 70/100
GiganticMinecraft/SeichiAssist#2978 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
chipsalliance/rocket-chip#3833 ·