Skip to content

Comments

Adding DotBot examples#208

Open
genkimiyauchi wants to merge 13 commits intoDotBots:mainfrom
genkimiyauchi:develop-examples
Open

Adding DotBot examples#208
genkimiyauchi wants to merge 13 commits intoDotBots:mainfrom
genkimiyauchi:develop-examples

Conversation

@genkimiyauchi
Copy link

Adding two examples for the PyDotBot.

1. Minimum naming game (with and without motion): From a list of potential words, a swarm of DotBots runs a distributed algorithm to agree on a single word using local communication.
2. Work and charge: A swarm of DotBots alternate moving between a work region to perform work and a charge region to recharge.

Copy link
Contributor

@geonnave geonnave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR!

Could you add a very basic README to each new example folder explaining:

  1. what it does
  2. how to run it (and specific dependencies to install, if applicable)

@genkimiyauchi
Copy link
Author

I've added a README for the two examples and removed optional dependencies from pyproject.toml. The dependencies are now mentioned in each of the example's README

Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have comestic comments. I'll try to test your PR later today.

return True, i

return False, None

No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

sup_init_state: [ 1, 0 ]
sup_current_state: [ 1, 0 ]
sup_data_pos: [ 0, 11 ]
sup_data: [ 2, EV_updateInventory, 0, 1, EV__selectAndBroadcast, 0, 0, 1, EV__selectAndBroadcast, 0, 0, 1, EV_startTimer, 0, 1, 1, EV_timeout, 0, 2, 1, EV_selectAndBroadcast, 0, 0 ] No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sup_data: [ 2, EV_updateInventory, 0, 1, EV__selectAndBroadcast, 0, 0, 1, EV__selectAndBroadcast, 0, 0, 1, EV_startTimer, 0, 1, 1, EV_timeout, 0, 2, 1, EV_selectAndBroadcast, 0, 0 ]
sup_data: [ 2, EV_updateInventory, 0, 1, EV__selectAndBroadcast, 0, 0, 1, EV__selectAndBroadcast, 0, 0, 1, EV_startTimer, 0, 1, 1, EV_timeout, 0, 2, 1, EV_selectAndBroadcast, 0, 0 ]

@aabadie
Copy link
Contributor

aabadie commented Feb 24, 2026

Also the CI is complaining because of code formatting issues. Install and run black to solve the problems.
There's another issues with pytest that cannot run because of missing dependencies in the CI environment. Maybe add scipy and yaml dependencies to tests_requirements.txt (https://github.com/DotBots/PyDotBot/blob/main/tests_requirements.txt)

@aabadie
Copy link
Contributor

aabadie commented Feb 24, 2026

Some of my comments above are still not addressed (the ones about the missing newline at end of file)

@genkimiyauchi
Copy link
Author

Sorry for the missed lines. I've fixed the lines at the end for the remaining files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants