Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow system robots to execute a large program in a single tick #1227

Closed
kostmo opened this issue Apr 27, 2023 · 1 comment · Fixed by #1231
Closed

Allow system robots to execute a large program in a single tick #1227

kostmo opened this issue Apr 27, 2023 · 1 comment · Fixed by #1231
Assignees
Labels
L-Commands Built-in commands (e.g. move, try, if, ...) in the Swarm language. Z-Feature A new feature to be added to the game.

Comments

@kostmo
Copy link
Member

kostmo commented Apr 27, 2023

There should be a privileged variant of atomic that allows an arbitrarily large program to be executed in a single tick.
This would be useful for setting up a play area with randomness, for example in the word search challenge (#999). As is, the player robot needs to be confined and to wait patiently while the system robot does a bunch of work. Unless the system robot is programmed carefully, the solution might be revealed to an observant player as the playfield setup is performed.

@kostmo kostmo added Z-Feature A new feature to be added to the game. L-Commands Built-in commands (e.g. move, try, if, ...) in the Swarm language. labels Apr 27, 2023
@byorgey
Copy link
Member

byorgey commented Apr 28, 2023

Ah, yes, that's a good idea, and it should be pretty easy. We could just do away with the validAtomic check for system robots, although in practice that is a little tricky since the validAtomic check is done statically, during type checking, but we won't know what capabilities the robot executing it will have until runtime. I guess we could just make a new super_atomic primitive (or whatever) that is just like atomic except that it requires god capability and does not do any validity checking.

@kostmo kostmo self-assigned this Apr 29, 2023
@mergify mergify bot closed this as completed in #1231 Apr 29, 2023
mergify bot pushed a commit that referenced this issue Apr 29, 2023
Closes #1227.

Demo:

    scripts/play.sh --scenario data/scenarios/Challenges/word-search.yaml --autoplay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L-Commands Built-in commands (e.g. move, try, if, ...) in the Swarm language. Z-Feature A new feature to be added to the game.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants