Just to be clear, I don't think this should be question better suited for stackoverflow.com simply because there's not a single answer but a wide range of possible solutions, making this question far more subjective in nature.
I was curious how you guys would tackle a pattern-finding program, which is to say I'd do the following operations:
- I enter in some input.
- Program predicts my next input based on all previous inputs.
- Rinse. Repeat.
Since the amount of input I could provide is so varied, including empty strings, conventional means such as switches or regular expressions are out, since it would require you to have an inkling of information about what to expect.
I was thinking about some form of genetic algorithm, yet even then I don't have a clue as to how to approach a problem of this caliber. I think some feedback mechanism would be necessary as well as to let the program know how close it was.
Anyone had to do a similar type program before?