| ||||||||||
Updates on the site. FITT transform, in D and Python: http://www.fantascienza.net/leonardo/so/index.html#fitt Algorithm described in "Optimization in Permutation Spaces" by Silvio Turrini, WRL Research Report 96/1: http://www.hpl.hp.com/techreports/Compaq-DEC/WRL-96-1.pdf http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.95.172 The D version is also an example of how to write idiomatic D2 code. ------------------ D and Python translations of a small Score 4 (Force 4) game player program: http://www.fantascienza.net/leonardo/js/index.html#score4 Original C++ code by Dr. Ing. Thanassis Tsiodras: http://users.softlab.ece.ntua.gr/~ttsiod/score4.html https://github.com/ttsiodras/Score4 The Python and D code contains one extra optimization, it doesn't call the computeBoardScore() method for the leaves, because it wasted computing time. The original author has also created a further optimized C++ version that performs memoization on the performance-critical function computeBoardScore(). But I have not added this optimization to a D version because of some hard to find performance problem in D associative arrays. | ||||||||||
comments: Leave a comment ![]() ![]() ![]() |