NetLogo / NetLogo/Python-Extension

Add ability to pass agents to python

未關閉
#2 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Scala
星號
31
分支
16
PR 合併指標
30 天內沒有已合併 PR

描述

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

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

未指定檔案或測試。先追蹤現有的 py:set 和 py:runresult 行為,然後定義 agent 變數如何成為唯讀的類 dict Python 物件。完成的標準是可以將 agent 傳遞給 Python,且文件清楚說明值可能會在 NetLogo 變更後變得過時。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python, scala
領域
api
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。