Skip to content

Latest commit

 

History

History
78 lines (56 loc) · 2.24 KB

TODO.md

File metadata and controls

78 lines (56 loc) · 2.24 KB

State machines


General

Basics

Code

  • Best practices - Debugging, Testing
    • Also: With nested machines

Concepts

  • Non-deterministic random state possibility
    • Light switch: On 'on', 50% chance to break next time (final)
  • Self-transitioning state loop
    • Wait for data, get data, wait again (for more), ... (simple concat output)

Advanced

  • Shield concept
    • States : Off, On
    • Transitions : Charging, Shutting down, Depleting
    • Properties : Energy, Runtime/Duration (if on)
    • Guards : Time left?, Depleted?
    • Loops : On (Deplete)
    • Actions : Deplete (if running, if requested by other entity, ...)
      • Internal/External property changes
      • Self-modifying state capability?
    • Interactions : Can be depleted by () ...
      • Aka: Side effects with other entities
      • Similar to guards (or same?)

Design

  • How to create UI from diagrams only?
    • Do they still need 'old fashioned' booleans for display conditions?

Diagrams

Use basic diagrams from 'XState' tutorial and re-create for own demo project.

  • Design ship/shield concept (Official notation / UML)
    • Add: Timeout (e.g. shield on automatically turns off after given time)
    • Add: Guard (e.g. shield can be used max N times)

Technologies

Robot

  • Nested/parallel state machines (Robot: via invoke)?
    • Complex to setup, even harder to debug/maintain - Best practices?
  • Timed/Async state machines (Delay in transition, e.g. timeout)
    • Can be done with promises

XState