Finite State Automata - From Theory to Code

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.ค. 2024
  • This video presents in detail the creation of a general-purpose state machine using JavaScript. The result is code that we can quickly adapt to any finite automata by changing a few constants. This code can be tested in the W3Schools' JavaScript Online Editor www.w3schools.com/js/js_edito....
    GitHub Source Code: github.com/intermation/video_...
    Timestamps
    00:00 | Intro
    00:11 | Problem statement
    03:38 | Why we're using JavaScript
    06:26 | Review of what it takes to represent an FSM
    08:57 | Representing states in our code
    12:41 | Representing input alphabet in our code
    13:24 | Representing transition functions in our code
    15:58 | A brief word about output
    16:22 | JavaScript template starting point
    16:51 | Defining the State array
    17:50 | Defining the initial state and accepting states
    18:40 | Defining the input alphabet string
    18:50 | Defining the transition table
    20:25 | Writing the transition function - returnNextState()
    23:18 | Writing the code to simulate the actual machine
    29:45 | Handling errors in input stream characters
    32:22 | Demonstrating the code in a browser
    Hashtags
    #javascript #state #machine

ความคิดเห็น • 11

  • @kotimara8711
    @kotimara8711 2 ปีที่แล้ว +15

    Walter white is a great teacher, not gonna lie

  • @babayaga6871
    @babayaga6871 8 หลายเดือนก่อน +1

    Thank you sir, you help me throughout my college project

  • @exxzxxe
    @exxzxxe 2 ปีที่แล้ว

    Really well done! And an excellent presentation.

  • @tegotube
    @tegotube ปีที่แล้ว

    Impressive and didactic explanation.👋👋👋
    Thank you so much

  • @estranhokonsta
    @estranhokonsta ปีที่แล้ว

    Thanks for the video. Great content.
    About the const vs let situation mentioned at 24:48, one could have argued that, given the type of language 'js' is, you should have used a linter to warn you. But it is, nonetheless, a fair remark to be made about 'js'.
    Note that you forget to include an "edit comment" about the `inputSequence` syntax error at 23:50 :)

  • @tinchovm85
    @tinchovm85 ปีที่แล้ว

    Great content.

  • @forheuristiclifeksh7836
    @forheuristiclifeksh7836 หลายเดือนก่อน +1

    20:17

  • @keegster7167
    @keegster7167 ปีที่แล้ว

    17:51
    18:40

  • @suelingsusu1339
    @suelingsusu1339 2 ปีที่แล้ว

    👏👏👏👏🙏🙏🙏🙏🙏👌👌👌👌👌🖖🖖🖖🖖🖖🖖🖖

  • @Peter-bg1ku
    @Peter-bg1ku 5 หลายเดือนก่อน

    I think it should be a crime to teach computer theory without following up with some code

  • @michaelkohlhaas4427
    @michaelkohlhaas4427 9 หลายเดือนก่อน

    What is this shit? 😂😂😂