Closed hollandjg closed 1 year ago
This looks great! Just one small suggestions which may deserve to be addressed in another PR. It would be great to add a "customizable planner" in which the user can simply pass a transition function to determine which kind of state leads to which execution of an expeirmentalist/theorist. For instance, if there are no observations available, then we specify to execute experimentalist1. If observations and theories are available, then we specify to execute experimentalist2. I wonder which way might be the best so specify that (e.g., a transition matrix).
Yes, at the moment you'd have to define a planner function like on line 425 in the example init.py which will have complete access to the state
object, whatever it is. It's also perfectly fine to duplicate and modify the planners in the planner.py file if you want a different state-transition matrix but the same kind of set-up.
There isn't an abstract representation of "states" like has a theory
, has more than two theories
, has no data
which we could use for a general function, but if someone can work one out based on the state objects (or a different state object with a similar interface) then we could include that.
this is too big. Closing for now, will move this to a separate repo. Thanks for the feedback!
Description
Added functions for planning the next step in the AER cycle, based on the current state.
This is part of the solution to:
238
247
248
This builds on:
299
Type of change:
Features:
Planner
– which takes in an arbitrary cycle state and returns the name of a step (i.e.experimentalist
,experiment_runner
,theorist
,full_cycle
or any other name the experiment might understand)full_cycle_planner
which returns just the string"full_cycle"
last_result_kind_planner
which returns the correct operation based on the last result.random_operation_planner
which returns one of the steps at random