Overview
The MI » MU puzzle is based on the similarly-named puzzle found in Douglas Hofstadter's Gödel Escher Bach. In this puzzle, the aim is to begin with MI and end with MU. The only permissible symbols in this puzzle are M, I and U.
Description
Starting with the initial string "MI", can you create the string "MU" while abiding by the following rules:
The aim of this program is to demonstrate how string manipulation functions may be used to control program flow, and to have some fun with LabVIEW.
Steps to Implement or Execute Code
Requirements
Software
VI Snippet
Screenshot of Main VI
Screenshot of sub VI
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Just some tweaks here:
You don't need the timeouts for the event structures. All that does is create a polling situation.
With that, your Breakout control terminal should be inside of the Apply Value Change event case.
You're absolutely right on both counts. 🙂
Paranoia surrounding hung event structures induces me to add time-outs to nearly every event structure I use. I'll make those changes on the next revision.
Thanks for the heads up!
I found a bug when trying to do Rule 4. I was finding that I couldn't apply rule 4 at the end of the string. Then I found that you have an extra comparison! I'm pretty sure it was because you copied the Rule 3 case. When testing the selections of Rule 4, your shift register should only be giving the immediately previous iteration, not previous 2 iterations.