Combinations and Permutations: UPDATE

This version brings updates to how it finds out all permutations, in the older version it used to search through the so far generated nodes backwards and pick a number that wasn’t used(dumb by all means, but got the job done). But when looked at it from a different perspective, why not have something like a dictionary? When used, mark it. But again there would be a problem of copying the whole array for the next call of the recursive method: it feels like we’d have to copy the whole thing but it doesn’t need to. What I did was to remove the change done after the recursive call, it was not a planned move but it should work. There was no reason not to. Done.

Download the source


Tuck Tick Tuk Game

Another student project, this one is a game based on simple game logic. When it’s time comes up it checks all available places to put a X, and selects the place that does the most damage to the user, for example if the user has 2 Os in a row, the other place free in the same row gets the highest score and because of that it selects that point and makes the user’s plans futile. Even though I didn’t intend to specially code up an AI for it supporting double chances and all, it does use double chances an awful lot. And the only way a user is going to win this game is by through a double chance, that’s it other than that he/she’ll only get a draw at best. It’s not that the game is ignorant, it’s just that we don’t score every possible decision and select the best one in our heads, it does that well.

The interface is done in wxPython 2.8 so you might need to install it.
Download Windows binary package
Download the python source

If an error comes up saying you need to reinstall the program or something similar, download and install this.