dicelab-rhul/vacuumworld

Providing different colour minds to run()

Closed this issue · 4 comments

The documentation describes being able to pass different minds (for each colour) to run() as follows:

run(white_mind, green_mind, orange_mind)

This works perfectly as intended as long as you provide all three, and they're passed in the given order. The documentation (6.2 of the guide and page 6 of the wiki) is not very clear about how this works and it would be nice to be able to provide different colour minds individually as keyword arguments:

run(green_mind=my_mind_object, orange_mind=my_other_mind_object)

The source code for vacuumworld.run() already includes keywords for each non-white colour mind but requires a white mind to be passed:

def run(white_mind, green_mind=None, orange_mind=None, **kwargs) ...

It would be helpful to amend the documentation to describe this.

Alternatively, perhaps a default mind could be provided as a positional argument and white_mind given as a keyword in conjunction (as with orange_mind and green_mind)?

def run(default_mind, white_mind=None, green_mind=None, orange_mind=None, **kwargs) ...

Unless there is a reason for the current approach.

What do you think @BenedictWilkinsAI ?

For reference, #17 .

After discussing with Ben, I amended the code, and enriched the wiki.

As of eb1d95c, the behaviour of default_mind, white_mind, green_mind, and orange_mind has been slightly changed.

See https://github.com/dicelab-rhul/vacuumworld/wiki/6)-Installing-and-Running for further details.

If no further problem arises, I'm closing the issue in 24 hours.