Link
http://www.swietochlowice.org/~mierzwm/ttt3d/index.html
The reason
When I was a schoolboy we were often playing TicTacToe 4x4x4 with friend of mine. It can be pretty difficult game where you have to foresee next moves exactly as in game of chess. So I had a while and I searched Internet to find such game to give a trial to my skills and of course - have fun. One of them did not run because incorrect Java VM version, second was playing too schematically because programmer simply included a lot of tables with best moves and one was just terribly ugly. At least I have found one that played pretty strong but it still lacked in interface. At this point I thought to myself “For God's sake! It can be done better!”. So to not to be one that does not practice what he preaches I have decided to provide my own solution.
And there it is, you can see it there and come around if I succeeded in achieving initial assumptions. Try to beat machine, it is not very easy but possible.
Technical info
I have decided to develop it in javascript. Why? Maybe to show that such things can be done without installing plugins to webbrowsers, and maybe because in javascript I have much more control over space that is provided by webbrowser.
I have also developed few auxiliary libraries, that helped me to provide convenient interface. Including movable windows, hint clouds, lazy script & image loader etc. I also used great library ( slightly adjusted) that comes from Lutz Tautenhahn http://www.lutanho.net/svgvml3d/index.html which provide uniform way to handle both VML and SVG and aid to put 3D elements.
It is pure javascript and was tested with all comparatively new versions of most popular webbrowsers, it is IE 7,8, FF 3.x, Opera 10, Google Chrome. For AI I have implemented modified MiniMax with alfa-beta pruning algorithm and set up depth of thinking to 4 half-moves, which was enough to beat all others TTT 4x4x4 implementations I have found in the net and tie with one the strongest.
Sum up
Javascript has growed from auxilary "page modification" language to being fully capable to implement applications and it can in some cases do better then Flash or Java. What would be very, very nice is to be able develop multithread apps (deep pondering at the background).
We can also compare speeds of different implementations of js run time machine. As we could expect Trident is the slowest one the rest is much more faster and Webkit seems to be the fastest over Gecko and Presto.
Best of Blender Artists: 2026-23
1 day ago
