Finite State Machines
10 points.
Evolve a finite state machine (FSM) to determine whether or
not a number is divisable by 5.
-
First, define an encoding for your FSM. To solve the
disability by 5 problem, your FSM will need only 4 states.
-
Create a simulator that will execute your FSM on a given
input, and return whether or not the FSM accepts the input.
-
Create a fitness function that tests your FSM against
randomly selected 16-bit numbers.
Extra Credit - create a generalized FSM genome class.
User should be able to set number of states, input alphabet, etc.
Simulation methods include restart(), input(sym), accepting?(), etc.
(10 points).
Files for the project are available here.