{"id":656,"date":"2026-04-25T10:58:47","date_gmt":"2026-04-25T14:58:47","guid":{"rendered":"http:\/\/stephendavies.org\/data420\/?p=656"},"modified":"2026-04-25T10:58:47","modified_gmt":"2026-04-25T14:58:47","slug":"the-node-property","status":"publish","type":"post","link":"http:\/\/stephendavies.org\/data420\/index.php\/2026\/04\/25\/the-node-property\/","title":{"rendered":"The &#8220;node&#8221; property"},"content":{"rendered":"<p>I&#8217;m getting a couple (good) questions about how to compute the node ID (in the IPD graph) for a particular agent. Some of you have discerned that the node ID seems to be equal to the agent&#8217;s <tt>unique_id<\/tt> minus 1. You can&#8217;t count on this, though, since Mesa leaves open the possibility that it will assign <tt>unique_id<\/tt>s differently.<\/p>\n<p>This is what the <tt>.node<\/tt> property is for (see lines 266-268 of <tt>base.py<\/tt>). If you have your hands on an instance of <tt>IPDAgent<\/tt> (including any subclass) called, say, &#8220;<tt>a<\/tt>&#8220;, you can simply do:<\/p>\n<pre>\r\n    ...  a.node  ...\r\n<\/pre>\n<p>to get its correct node ID.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m getting a couple (good) questions about how to compute the node ID (in the IPD graph) for a particular agent. Some of you have discerned that the node ID seems to be equal to the agent&#8217;s unique_id minus 1. You can&#8217;t count on this, though, since Mesa leaves open the possibility that it will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[1],"tags":[],"class_list":["post-656","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/stephendavies.org\/data420\/index.php\/wp-json\/wp\/v2\/posts\/656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/stephendavies.org\/data420\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/stephendavies.org\/data420\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/stephendavies.org\/data420\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/stephendavies.org\/data420\/index.php\/wp-json\/wp\/v2\/comments?post=656"}],"version-history":[{"count":1,"href":"http:\/\/stephendavies.org\/data420\/index.php\/wp-json\/wp\/v2\/posts\/656\/revisions"}],"predecessor-version":[{"id":657,"href":"http:\/\/stephendavies.org\/data420\/index.php\/wp-json\/wp\/v2\/posts\/656\/revisions\/657"}],"wp:attachment":[{"href":"http:\/\/stephendavies.org\/data420\/index.php\/wp-json\/wp\/v2\/media?parent=656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/stephendavies.org\/data420\/index.php\/wp-json\/wp\/v2\/categories?post=656"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/stephendavies.org\/data420\/index.php\/wp-json\/wp\/v2\/tags?post=656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}