A non-optimised solver for Mastermind-like games. It's non-optimised because it doesn't binary search to cut down on the search space: it only ever recommends guessing actual possible candidate solutions (i.e. it "plays lucky").
See it in action at https://danq.me/wp-content/uploads/mastermind.html.
Download mastermind.html and open it in your web browser.