Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.md
stringmatch.py

README.md

StringMatch

stringmatch.py will attempt to match a given string. Not considerably advanced, but it works and as a bonus, looks a lot like the terrible "high tech combo locks" you see in old scifi movies.

This is actually a pretty good example, since it's very easy to manipulate with basic tools, minimizing the real challenges like a reasonable scoring system or interesting end goal.

This was hand coded, using no non-standard libraries. Should be a pretty simple example if you're getting started, as it's also my first attempt at doing such coding.

Example Output

Note, this output has a bug relating to character selection. I left it in because it's neat.

Working to target hello world! you will be deconstructed with a score of 38
Best in generation   1 :he scoring -70
Best in generation   2 :he,.?!*_-' scoring -54
Best in generation   3 :he,.?!*_,.?!*_-'' scoring -39
Best in generation   4 :he,.?!*_,.?!*_-',.?!*_-' scoring -25
Best in generation   5 :he,.?!*_,.?!*_-',.?!*_-'k scoring -23
Best in generation   6 :he,.?!*_,.?!*_-',.v?!*_-'k scoring -21
Best in generation   7 :he,.?!*_,.?!*_-',.v?!*_-'ke scoring -18
Best in generation   8 :he,.?!*_,.?!*_-',.v?!*_-'ke,.?!*_-' scoring -2
Best in generation   9 :he,.?!*_,.?!*_-',.v?!*_-'ke,.?!*_-'t scoring 1
Best in generation  10 :he,.?!*_,.?!*_-',.v?!*_-'ke,.?!*_-'tc scoring 3
Best in generation  11 :he,.?!*_,.?!*_-',.v?!*_-'ke,.?!*_-'tc9 scoring 5
Best in generation  12 :he,.?!*_,.?!*_-',.v?!*_-'de,.?!*_-'tc9 scoring 6
Best in generation  13 :he,.?!*_,.?!*_-',.v?!*_-'de,.?!*_u'tc9 scoring 7
Best in generation  19 :he,.?!*_,.?!*_-',.v?!*_-'de,.?!*_u'te9 scoring 8
Best in generation  24 :he,.?!*_,.?!*_-',.v?!*_- de,.?!*_u'te9 scoring 9
Best in generation  32 :he,.o!*_,.?!*_-',.v?!*_- de,.?!*_u'te9 scoring 10
Best in generation  37 :he,.o!*_,.?!*y-',.v?!*_- de,.?!*_u'te9 scoring 11
Best in generation  42 :he,.o!*_,.d!*y-',.v?!*_- de,.?!*_u'te9 scoring 12
Best in generation  43 :he,.o!*o,.d!*y-',.v?!*_- de,.?!*_u'te9 scoring 13
Best in generation  46 :he,.o!*o,.d!*y-u,.v?!*_- de,.?!*_u'te9 scoring 14
Best in generation  47 :he,.o!*o,.d!*y-u,.v?!*_- de,.?!t_u'te9 scoring 15
Best in generation  50 :he,.o!*o,.d!*y-u,.v?! _- de,.?!t_u'te9 scoring 16
Best in generation  58 :he,.o!*o,.d!*y-u,.v?! _- de,.?st_u'te9 scoring 17
Best in generation  61 :he,lo!*o,.d!*y-u,.v?! _- de,.?st_u'te9 scoring 18
Best in generation  66 :he,lo!*o,.d! y-u,.v?! _- de,.?st_u'te9 scoring 19
Best in generation  68 :he,lo!*o,.d! y-u,.i?! _- de,.?st_u'te9 scoring 20
Best in generation  70 :he,lo!*o,.d! y-u,.i?! _- de,o?st_u'te9 scoring 21
Best in generation  71 :he,lo!*o,.d! y-u,.i?! _- de,o?st_u'ted scoring 22
Best in generation  73 :he,lo!*o,.d! y-u .i?! _- de,o?st_u'ted scoring 23
Best in generation  76 :he,lo *o,.d! y-u .i?! _- de,o?st_u'ted scoring 24
Best in generation  80 :he,lo *o,.d! y-u .il! _- de,o?st_u'ted scoring 25
Best in generation  81 :he,lo *o,.d! y-u .ill _- de,o?st_u'ted scoring 26
Best in generation  91 :he,lo wo,.d! y-u .ill _- de,o?st_u'ted scoring 27
Best in generation  93 :he,lo wo,.d! y-u .ill _- de,onst_u'ted scoring 28
Best in generation  97 :he,lo wor.d! y-u .ill _- de,onst_u'ted scoring 29
Best in generation 104 :he,lo wor.d! y-u .ill _- de,onstru'ted scoring 30
Best in generation 106 :he,lo wor.d! y-u will _- de,onstru'ted scoring 31
Best in generation 108 :he,lo wor.d! y-u will b- de,onstru'ted scoring 32
Best in generation 123 :he,lo wor.d! y-u will b- deconstru'ted scoring 33
Best in generation 135 :hello wor.d! y-u will b- deconstru'ted scoring 34
Best in generation 137 :hello wor.d! y-u will be deconstru'ted scoring 35
Best in generation 162 :hello wor.d! y-u will be deconstructed scoring 36
Best in generation 181 :hello world! y-u will be deconstructed scoring 37
Best in generation 185 :hello world! you will be deconstructed scoring 38
Target Reached