evoldoers / machineboss

Bioinformatics Open Source Sequence machine
BSD 3-Clause "New" or "Revised" License
33 stars 7 forks source link

Simulator #42

Open ihh opened 6 years ago

ihh commented 6 years ago

All cases (conditioned on input, output, both, or neither) can be reduced to the null machine (empty input & output) by appropriate compositions with generators/acceptors. Then, that null machine can be solved by matrix inversion. In fact, the machine is acyclic & topologically sorted at this point, so the inversion can be done efficiently by calculating the sum-over-paths likelihood from each state to the end state.

ihh commented 6 years ago

Random output, conditioned on input, is implemented as of 5d82cb4 using --random-encode. It should now be possible to simulate both e.g. by randomly generating the input (with a suitable automata projection that hides the output & transposes), then randomly generating output conditional on the input. Not very efficient perhaps, but it would work