Skip to content

ENH: Collections of nodes #189

@tturocy

Description

@tturocy

There is not yet a built-in way to get (sub)sets of the nodes of an extensive game. Some ideas:

  • Game.nodes returns a collection of nodes. Presumably this should be implemented implicitly - it should return an e.g. NodeSet object rather than an explicit list of nodes.
  • This NodeSet should define the ability to filter on a boolean function. Possibly getitem should be used for this (which would be similar to pandas indexing), although perhaps a .filter() member could be defined instead.

This might then combine well with #188 (nodes as histories) in building games - as it would be easy e.g. to filter on "all terminal nodes with histories matching a particular pattern".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpythonItems which involve coding in Python

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions