Skip to main content

Questions tagged [state-machine]

A state machine is a model for designing systems which change based upon their current state and what input they receive.

3 votes
1 answer
128 views

IMAP client impementation on State Machine boost-ext/sml

I made IMAP(IMAPS) notifier on boost-ext/sml state machine. There is an opinion that networking is best done on machines. Compile in C++20. Tested on GMail server. Uses karastojko/mailio (and ...
Alexovsky's user avatar
1 vote
1 answer
157 views

Rust state-machine lexer

I tried implementing a lexer in rust that peeks ahead at the next character and makes a decision based on that. However, i am told that this is bad practice, and instead i should be using finite-state-...
xxxxxxxxxx's user avatar
2 votes
1 answer
336 views

Templated state machine

I decided to try a hand at writing a simple state machine. The StateMachine class accepts any number of classes as template arguments, along with a base class. The ...
Ross Lombardi's user avatar
1 vote
1 answer
84 views

State machine for parsing GitHub URL formats

A while ago, I wrote a small Rust crate for parsing & generating URLs for GitHub repositories in various formats (HTTPS, SSH, git://, etc.), with the parsing done using regular expressions with ...
jwodder's user avatar
  • 402
1 vote
1 answer
59 views

Framework to create turing machines with binary increment example

I created a way to create turing machines and implemented one that increments a binary number as an example. This is the turing machine itself: ...
Cookie04's user avatar
  • 125
0 votes
1 answer
109 views

Simultanous states in a state machine

In Dungeons and Dragons, we have many spells, e.g. the Charm spell to get anyone to do what you want, the Web spell to entangle someone, the Invisibility spell to make yourself invisible (but once you ...
prestokeys's user avatar
  • 1,371
1 vote
1 answer
292 views

Another Vending Machine implementing State Pattern

I previously asked for a review for a Vending Machine implementing State Pattern in this linked post. And received an answer from @radarbob. The code below is my revised attempt based on some of @...
fourbeatcoder's user avatar
2 votes
2 answers
231 views

State-machine class based upon arduino toolchain

In my quest to search or develop the 'perfect' state machine I have built the following class. With the class you can make a state machine object which comes with timing and transition methods. Being ...
bask185's user avatar
  • 128
2 votes
0 answers
55 views

Deterministic and nondeterministic finite automata in scheme

This is the implementation of both Deterministic Finite Automata (DFAs) and Nondeterministic Finite Automata (NFAs) on r7rs scheme, using only SRFI 1. The file automata.scm contains the implementation ...
phillbush's user avatar
  • 864
8 votes
1 answer
583 views

Haskell Tic-Tac-Toe (with automation and GUI)

There are already many Tic Tac Toe posts. But as far as I can tell, none of the ones in Haskell are complete with a GUI Here is my implementation with Gloss. Gist Link for convenience ...
Agnishom Chattopadhyay's user avatar
2 votes
2 answers
673 views

Game States / Pong: SFML Box2D EnTT

Trying to make a little 2D engine I can play with. The end goal is a simple multiplayer PVP game just using shapes. I will make one version using ECS and one using OOP for learning. This is the shell ...
Teach_Me_Something's user avatar
1 vote
0 answers
73 views

State machine in C for SDL game [closed]

I want to create a state machine for menu in my SDL game. So this is my code without the SDL. I just want to ask if this is a good way to create it. I am trying to implement a screen and then mouse ...
matthews's user avatar
1 vote
1 answer
236 views

Simple state machine

I tried implementing a state machine in C. This is for a Stratosphere Balloon and I wanted to use a state machine to make it better. This will be later implemented in ARM CMSIS. The state function ...
moonraccoon's user avatar
2 votes
0 answers
37 views

define a lisp function, that takes fsm , a transition and state-index and return the state obtained by the transition from the state

The state machine has the below specifications (defparameter *test-machine* (make-fsm :alphabet '(a b) :table '((2 1) (0 2) (1 0)) :initial 0 :accepting '(2))) ...
Ssunsshine's user avatar
3 votes
1 answer
90 views

Sequence state machine

I tried to parse command line arguments. The program requires four arguments. I iterate over the arguments. If the argument is an option, I process the option. Otherwise the argument is one of the ...
ceving's user avatar
  • 413

15 30 50 per page
1
2 3 4 5
10