3 ms·
use to find that way of thinking mostly in perl hackers. A pity that people choose to sacrifice a lot of readability just to save a few characters in the sourc
by gcb 16y ago
use to find that way of thinking mostly in perl hackers.
A pity that people choose to sacrifice a lot of readability just to save a few characters in the source... it's not even justifiable in a interpreted language... in a language that you have to compile it's criminal
- rayval 16y agoThe source is not intended to be readable. The glory is in the 1433 characters total (or 133 lines, if you prefer that metric). Everyone knows that it is artificial, but it does not matter. The spirit is similar to the 10K Javascript contest (see http://10k.aneventapart.com/ http://10k.aneventapart.com/ ) If you want to try to understand the chess code, the author provides an expanded version with comments that is more readable: http://home.hccnet.nl/h.g.muller/maximax.txt http://home.hccnet.nl/h.g.muller/maximax.txt In order to read the code, it is helpful to understand the basic algorithm (recursive negamax search). Here is a good explanation of minimax, negamax and alphabeta: http://www.hamedahmadi.com/gametree/ http://www.hamedahmadi.com/gametree/