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

Topic: ↓↑ Boolean State Machine annotation #40

Open
EloiStree opened this issue May 5, 2020 · 9 comments
Open

Topic: ↓↑ Boolean State Machine annotation #40

EloiStree opened this issue May 5, 2020 · 9 comments

Comments

@EloiStree
Copy link
Owner

EloiStree commented May 5, 2020

If I give you this boolean:
IsHandsOverHead
IsHandsStandingStill
IsHandOnLeftSide
IsHandOnRightSide
IsHandLeftNearHead
IsHandRightNearHead
Could you check if the player is holding his hand in the air ?
Could you check if the player is asking a question ?
Could you check if the player is crossing hands ?
Yes by doing combination.

But to do that you need to connect the dote in a way or an other that the programme can understand.
That the idea of this thread to check around what has been done with boolean state machine and how I could write my "own" converter to allow user to know learn a coding language but still use logic to do they own input trigger.

@EloiStree
Copy link
Owner Author

EloiStree commented May 5, 2020

Try to code

@EloiStree
Copy link
Owner Author

EloiStree commented May 5, 2020

Classic Boolean Algebra

image

Youtube Video
https://youtu.be/0as464WmfCo

Rules:

image
( DeMorgan's Theorem , And gate rules, OR gate rules

Or

A B A + B
0 0 0
0 1 1
1 0 1
1 1 1

And

A B A . B
0 0 0
0 1 0
1 0 0
1 1 1

Not

A ~A
0 1
1 0

NAND

A B ~(A . B)
0 0 1
0 1 1
1 0 1
1 1 0

NOR

A B ~(A + B)
0 0 1
0 1 0
1 0 0
1 1 0

XOR

A B A ⊕ B
0 0 0
0 1 1
1 0 1
1 1 0

X-NOR

A B A ◉ B
0 0 1
0 1 0
1 0 0
1 1 1

@EloiStree
Copy link
Owner Author

EloiStree commented May 5, 2020

When boolean are not enough

Youtube Video

@EloiStree
Copy link
Owner Author

EloiStree commented May 5, 2020

Moore FSM - Mealy FSM

Youtube Video

State machine to digital circuit

Youtube Video

@EloiStree
Copy link
Owner Author

EloiStree commented May 5, 2020

Regular expression

Reminder of the basic

Youtube Video
Youtube Video
By Professor Brailsford
Keyword:

  • Stephen Cole Kleene
  • Chomsky type 3
  • Automaton
  • Regular expression

Some tutorial(s)

Youtube Video

Sandbox

What direction I am looking for using it

New to Last Change : B↓ A↓ X↑ Y↑ Y↓ X↓
Last To new Change: X↓ Y↓ Y↑ X↑ A↓ B↓
On: A B
Off: X Y ArrowUp ArrowDown ArrowLeft ArrowRight

Group|XboxButton| Y X A B
Group|XboxArrows| XboxArrowUp XboxArrowDown XboxArrowLeft XboxArrowRight
Regex|N->L|0.25s: (Y↓)|(X↓) >"Y down or X down lately"
Regex|N->L|0.25s: (Y↓).(X↓) >"X Down followed by Y down lately"
Regex|N->L|0.25s: (Y↓){3} >"Triple Y Click"
Regex|L->N|0.25s: ^(Y↓).
(X↓) >"X Down followed by Y down lately"
Regex|On|0.25s: (A.*B)|(B.*A) >"A and B are on"
Regex|Off|0.25s: (X.*Y)|(Y.*X) >"X and Y are off"

Look ahead ?

Youtube Video

@EloiStree EloiStree changed the title Topic: Boolean State Machine annotation Topic: ↓↑ Boolean State Machine annotation May 5, 2020
@EloiStree
Copy link
Owner Author

EloiStree commented May 5, 2020

Parsing

Youtube Video
Youtube Video

@EloiStree
Copy link
Owner Author

↓↑

Classic keyboard

Full line

ctrl+space↓ > "..."
Ctrl + Down↓ >"↓"
Ctrl +Up↓ >"↑"
Ctrl + Left↓ >"←"
Ctrl +Right↓ >"→"

Multi condition on one key

p↓ >Switch weapon to assault
NAND(U,AltGR) +p↑ >Fire with one shot
U +p↑ >Fire with rafale shot
AltGR +p↑ >Switch Loop shot

App Focus

obsrunning + focusGmail↓ > "Display warning message"
focusYoutube + CtrlRight↓ > "Fullscreen"

Screen

leftdowncorner↓> "Actoion 1"
leftdowncorner↓> leftdowncorner↓> "Action 2"
leftdowncorner↓> leftdowncorner↓> leftdowncorner↓> "Action 3"

Tap

Index↓+Middle↓>Thumb↓+Index↓> ""
xooxx > oxoxx > ""
lxxxxo > roxxxx > ""

@EloiStree
Copy link
Owner Author

EloiStree commented May 8, 2020

Current used

Info

☗ Global variable for construction
A ➤ B ➤ C Construction of a linear state machine
A // Is boolean named A is true ?
! A // Is boolean named A is false ?
☗ MaxTime|3000 // Define time to check for "true" and "false" change
A↓ // Was boolean named A was true recently ?
A↑ // Was boolean named A was false recently ?
... ➤"..." //Emit text if previous state was valide
... ➤Set|varName|true //Variable set to true/false if previous state was valide
... ➤fct|playmusic|johncena.mp3 loop // Call the fct to play music with a music in loop if previous condition are true (function need to be code by the developer ;) )

And|!A !E ➤"AE is not used"
And|300|A E↓ ➤"A is used and E was down in last 0.3s"
Or|300|A E↓ ➤ "A is used or E was down in last 0.3s"
Xor|300|A E↓ ➤ "A is used xor E was down in last 0.3s"

Group|Z E R A ➤Regex|NL|1000|(A↓.*Z↓)|(Z↓.*A↓)➤"Hello" // Construct a history of Z E R A bool value change state and apply the regex from new change to latest. I the regex is match, it emits the text.

Example

☗ MaxTime|3000 
☗ Cooldown|3000 
☗ PressReleaseTime|500
☗ Iterator|Multiple

A  ➤ "A is On" 
!A ➤ "A is Off"
Z↓  ➤ "Z was Pressd"
Z↑  ➤ "Z was Released"
!Z↓  ➤ "Z was not pressd"
!Z↑  ➤ "Z was not released"

Ctlr + C↑ + A↑ ➤ "Do stuff"
Up↓ + Left↓ + Right↓ ➤ "Do stuff"


And|300|!A !E ➤"AE is not used"
And|300|A E↓ ➤"A is used and E was down"
Or|300|A E↓ ➤ "A is used or E was down"
Xor|300|A E↓ ➤ "A is used xor E was down"

☗ MaxTime|None  ☗ Cooldown|None  ☗ PressReleaseTime|500 ☗ Iterator|Unique

Ctl+C↓ ➤ Ctl+K↓ ➤ fct|setComment|true

youtube + ArrowLeft ➤ "Capcutre image"
MouseSE↓➤MouseSE↓➤"Select 3D Object"
MouseSE↓➤MouseSE↓➤"Select 3D Object"

Group|Z E R A ➤Regex|NL|1000|(A↓.*Z↓)|(Z↓.*A↓)➤"Left-Attack"➤Set|fireOnLeft|true
Group|Z E R A ➤Regex|NL|300|(E↓.*R↓)|(R↓.*E↓)➤"Step 2"
Group|Z E R A ➤Regex|NL|300|(Z↑.*E↑)|(E↑.*Z↑)➤"Yeah" 
FocusApex + Left↑ + Right↑ ➤ "You are " ➤ Down↓ ➤ " an idiot!"
FocusApex + Left↑ + Right↑ ➤ "You are " ➤ Up↓ ➤ " an genious!" 
FocusApex + Left↑ + Right↑ ➤ "You are " ➤ Right↓ ➤ " welcome!" 
FocusApex + Left↑ + Right↑ ➤ "You are " ➤ Left↓ ➤ " in danger!" 
Left↑ + Right↑ ➤ fct|SayBye|Eloi Odile Lionel Milo ➤ set|bonjour|false
Left↓ + Right↓ ➤ function|SayHello|Eloi Odile Lionel Milo ➤ set|bonjour|true

Ctlr + LeftArrow↑ ➤ Ctlr + RightArrow↑ ➤"Outil de sélection"
Shift+ LeftArrow↑ ➤ "Outil de découpe"

Y ➤Between|500|2000➤ "Do if Y was true after 500ms and before 4 seconds"
Y ➤Between|2000|9999➤ "Do if Y was true after 4 seconds and before 10 seconds"
Y↓ ➤ Y↑ ➤Between|0|3000➤ "Do if Y was release in the first 3 seconds after Y was down"

@EloiStree
Copy link
Owner Author

Used to text

R↓ Z↓ ➤ "Z was Released"
E↑ Z↑ ➤ "Z was Released"
E↓ Z↑ ➤ "Z was Released"
A ➤ "A is On"
!A ➤ "A is Off"
Z↓ ➤ "Z was Pressd"
!Z↓ ➤ "Z was not pressd"
!Z↑ ➤ "Z was not released"

AND|300| A Z ➤ "Z was Released"
AND|300| A↓ Z↓ ➤ "Z was Released"
AND|300| A↑ Z↑ ➤ "Z was Released"
OR|300| A Z➤ "Z was Released"
OR|300| A↓ Z↓➤ "Z was Released"
OR|300| A↑ Z↑➤ "Z was Released"
XOR|300| A Z➤ "1"➤ fct|Hello|1
XOR|300| A↓ Z↓➤ "2"➤ fct|Hello|2➤Set|AZ|true
XOR|300| A↑ Z↑➤ "3"➤ fct|Hello|3➤Set|AZ|false
AND|300| A Z ➤ "1"➤ fct|Hello|1
AND|300| A↓ Z↓➤ "2"➤ fct|Hello|2➤Set|AZ|true
AND|300| A↑ Z↑➤ "3"➤ fct|Hello|3➤Set|AZ|false
d

E↓ Z↓ ➤ "Ping"➤ E↑ Z↑ ➤ "Pong"

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

No branches or pull requests

1 participant