To Free or Not To Free? That is the question.

I was contacted recently by a PHD student of Mathematical Statistics and a lecturer of Computer Science topics in South Africa. He is on a quest for a project for his advanced students and he suggested that my Ingenious implementation provides a unique opportunity for creating bot logic without having to design and/or implement a user interface.

My design does lend itself to various bot implementations. Using Javascript Object Orientation and prototype class extensions, I’ve implemented the human player user interface as an extension of the bot. In essence, the human player class overrides the relatively small number of methods in the bot necessary to decide three high-level questions: 1) which tile do you want to play, 2) where do you want to play it, and 3) do you want to swap tiles at the end of your turn.

The bot implementations answer these questions by navigating their own copy of the board and by using those objects (and their corresponding data structures) make their decision based on a weighted analysis of options. The final answers are derived and returned to the core game logic and play continues with subsequent players. The human player implementation overrides these methods by simply passing control to the user interface for the human to answer. Once answered, the selections are returned to the core logic in the same fashion as the bot and play continues. The core game logic is neither aware nor interested in distinguishing human players from bots.

I’m flattered by the request and relish the idea of being part of the project. However, after some thought I respectfully declined the offer. My reason for implementing Ingenious was not to provide the best bots and/or online experience for the game. The best experience you can have is with the physical game and I openly encourage those who like the game to purchase a copy. By submitting my code to the project I feel that I would lose control of the implementation and would be unable to remove it from the web if requested by the designer and/or the publisher. I also feel that I would indirectly contribute to potentially multiple implementations were the code morphed and published on other sites.

I learned a lot from the implementation and found the bot logic rewarding work albeit challenging and time consuming. Restricting myself to Javascript/DHTML increased the level of complexity but challenge is good. If having your brain heat up to solve a problem you’re faced with doesn’t kill you, it will make you stronger. I hope those who regularly play, some 256,000 games last I checked, still find it fun and interesting. Enjoy.

Leave a Reply

Your email address will not be published. Required fields are marked *