proliferation of states
See original GitHub issueWith the coffee machine example in the readme, we go from 3 state attributes (beans, water, lid), to just one (beans), to make the following examples simpler. I’m a little confused about the complex case though. It seems like with n independent boolean state attributes, you need 2^n automat states, as well as appropriate upons . So for the coffee machine example:
@_machine.state(initial=True)
def no_beans_no_water_open_lid(self):
pass
@_machine.state()
def no_beans_water_open_lid(self):
pass
@_machine.state()
def no_beans_no_water_closed_lid(self):
pass
@_machine.state()
def no_beans_water_closed_lid(self):
pass
@_machine.state()
def beans_no_water_open_lid(self):
pass
@_machine.state()
def beans_water_open_lid(self):
pass
@_machine.state()
def beans_no_water_closed_lid(self):
pass
@_machine.state()
def beans_water_closed_lid(self):
pass
Or am I just thinking about this completely wrong?
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
The proliferation of states
The Proliferation of States. Not without reason, the world has been worrying about the prolif- eration of nuclear, biological, and chemical weapons, ...
Read more >When Did (and Didn't) States Proliferate? - Belfer Center
Proliferation refers to a spectrum of possible activities related to the exploration, pursuit, or acquisition of nuclear weapons by states.
Read more >Strategies of Nuclear Proliferation: How States Pursue the Bomb
Four strategies of proliferation are available to states: hedging, sprinting, hiding, and sheltered pursuit. Nuclear acquisition theory explains why a ...
Read more >Why Do States Build Nuclear Weapons? - JSTOR
relations scholars have a clear and simple answer to the proliferation puzzle: states will seek to develop nuclear weapons when they face a...
Read more >Treaty on the Non-Proliferation of Nuclear Weapons (NPT)
A total of 191 States have joined the Treaty, including the five nuclear-weapon States. More countries have ratified the NPT than any other...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Sure. I’ll give it a go.
Minor quibble: I’d want to call it
machine.flag, but otherwise this definitely looks interesting. I can’t say for sure I’d accept it without looking at more examples, but would you be willing to implement a proof of concept in a PR so some people can play with it and see if it addresses the use-case well?