Add ability to pass agents to python

オープン
#2 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python, scala
領域
api

調査の方向性

ファイルやテストは指定されていません。まず既存の py:set と py:runresult の動作を追跡し、次にエージェント変数を読み取り専用の dict のような Python オブジェクトにする方法を定義してください。エージェントを 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 はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NetLogo/Python-Extension のほかの issue

NetLogo/Python-Extension の issue をすべて見る

似ている issue

Scala の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。