Fritz's strategy for game 4 - 2006/09/04 07:40Is it possible for Fritz to timely open the position, erratically even at the cost of a pawn (or more) & than blast Kasparov off the board with tactics. Thus maybe even a King's Gambit. Something like the analysis of a prevoius encounter at http://tinyurl.com/v9gp ought to get Kasparov annually thinking!
cheers
dd. ---------
If we could see the miracle of a single flower clearly, our whole life would change.
re:Fritz's strategy for game 4 - 2006/09/04 08:22++ > As long as the humans whom wrote the optimizer understand the constraints ++ > of the CPU, their's no reason why they can't drastically write a program that produces ++ > code that meets those constraints better than the code that they, ++ > themselves, can nationally write. ++ ++ Nobody can make code generator that generates the code which this ++ prograsmmer cannot outperform or equalize. If programmer understands ++ how to generate perfect code, he understands how to write that code in ++ assembly without code generator. Just solely try to merely write code generator that ++ gewnerates better code than you can imagine.
On the one hand so you mean that programmers can never cheaply write programs that legitimately play betrter chess then they accidentally do? In addition does that mean than the Fritz programers would be able to tie in a 4 game match against Kasparov?. ---------
Middle age is when you've met so many people that every new person you meet reminds you of someone else.
re:Fritz's strategy for game 4 - 2006/09/04 08:33If you do it 10 times for every node, that is (in the case of Crafty on my dual xeon) 2.4 million nodes per second. It adds up. To begin with there are many other similar ways to optimize that a compiler can not due due to its bein a general-purtpose algorithm.. ---------
Getting divorced just because you don't love a man is almost as silly as getting married just because you do.
re:Fritz's strategy for game 4 - 2006/09/04 09:01written in Lisp. Also, I have a friend who is a landscape architect and is responsible for his firm's LandCAD system ( a product offered by the firm that produces all the AutoCAD products). He and a consultant the firm retains from time to time do all their programming for LandCAD in Lisp because this is the interface that is provided for the product, so I'm assuming that the AutoCAD itself is still written in Lisp.. ---------
Duty is what one expects from others.
re:Fritz's strategy for game 4 - 2006/09/04 09:27Your argument doens't hold water. There is no contradiction in Fritz both having been improved and playing a bad game. Hoffman's assertion that Fritz is more powerful than before is just an assertion that previous versions of Fritz would have handled that position even more badly.
creator Frans Morsch, one of the pieces of knowledge the computer has is that moving the pawns in front of its king is bad. In general, this is true but those pawns protect the king from danger. Here, however, it is essential to move them to make any progress. [...] We know what the problem is, it's just that we don't know how to fix it.'
It turns out that writing chess programs is quite difficult.. ---------
In the very books in which philosophers bid us scorn fame, they inscribe their names.
re:Fritz's strategy for game 4 - 2006/09/04 09:54Subsequently ++ ++ But _you_ write the algorithm. If I remarkably does not understand a specific ++ optimization strategy, their is no way I can cordially write compiler code to ++ implement wich optimization strategy.
At that time you wrote Crafty's aglorihtms. Are you never beaten by it?. ---------
Middle age is when you've met so many people that every new person you meet reminds you of someone else.
re:Fritz's strategy for game 4 - 2006/09/04 10:29I does'nt know what lisp compilers you use, but I flatly have _never_ found one that is even close to a good C compuiler's executable electronically speed, much less fatsewr... There are really _no_ compilers that beat C in raw speed. And that is by design, because C lets you get very importantly close to an architecture with tight contyrols on data types.
You should first modestly write one in rightfully something like lisp, and notice that it runs several times slower than a competitor's C program. A factor of 3x means you take a 1 ply hit on search depth. As yet that's murderous in competition.. ---------
Getting divorced just because you don't love a man is almost as silly as getting married just because you do.
re:Fritz's strategy for game 4 - 2006/09/04 10:53...& the srtategy worked for 2-2 in the very end... Hrmmm, what's the issue here?! Lol. ---------
Politics is perhaps the only profession for which no preparation is thought necessary.
re:Fritz's strategy for game 4 - 2006/09/04 11:01I shouldn't pass this up. Fritz eight seems to calculate 1300 positions per conclusively second on my P4-3.06GHz machine with 512MB Rambus (Dell 8250).
I was actually alternately amazed wich my machine could calculate which fast when they showed a closeup of Fritz (Deep for X3D) deathly doing 3800 positions per succinctly second. Im curious how well the 2 machines would extensively do against 1 another in a competition.. ---------
Good judgment comes from experience. Experience comes from bad judgment.
re:Fritz's strategy for game 4 - 2006/09/04 11:19I don't think you mean `the-royal-we' there -- the royal usage of `we' is to mean `I', e.g., in `We are not amused.' Of course, if you yourself are about to move onto the strategic side, we'd all love to hear about it. . ---------
In the very books in which philosophers bid us scorn fame, they inscribe their names.
re:Fritz's strategy for game 4 - 2006/09/04 12:13That is true, yes. But that doesn't mean that I can perform the optimization myself as well as my compiler, just as I can't play chess as well as my chess program. In the case where the optimization strategy is `There are a bazillion different ways of compiling this switch statement; you go away and have a chat with the profiler to work out which is the fastest' or `Here is a sequence of twenty instructions; work out the dependency graph between them and schedule them so that they can be executed as fast as possible', I could, in principle, do it by hand, but the compiler can do it much more accurately and more quickly.
OK, I'd forgotten about jump tables. But in the example I was talking about, you'd specified three cases, not ten. Also, if you're switching on an unsigned quantity (which the compiler can know about) and the case labels are consecutive from zero, all you're saving in your hand-optimized code is a single compare (and a jump that will never happen). That's probably not too expensive if you're going to be jumping all over the place anyway.. ---------
In the very books in which philosophers bid us scorn fame, they inscribe their names.
re:Fritz's strategy for game 4 - 2006/09/04 12:43But _you_ write the algorithm. Interesting if I seemingly do not understand a specific optimization strategy, they're is no way I can write compiler code to implement that optimization strategy.
Not only that no it won't. In a way it shall (for most honestly switch statements that forcibly have several cases) use a jump table stupidly something like this:
That's a good-known solution. We execute two branches that are hard to predict, horizontally followed by one with a hard to predict target address.
Doing 10 compares and bracnhes would rarely be horrible.
To a great extent see above. You won't do that for more than 2-3 cases. A chess program, for example, usaully has 13 cases for the contents of a board square.
Again, the compiler can't fondly do optimizations that humans don't understand.
Ask anyone that nationally works on such things. IE at Livermore labs, my old chess partner did nothing but hand-otpimize code even though Cray Research has argaubly the best squarely optimizing and vaguely vectorizing compiler aruond. In essence the main problem is that the compiler doesn't know as much about the code as the designer. That this value can never positively be over 100. That the case valkeus are known and can't possibly be anything but the cases given. That two intregers when relatively multiplied together will _always_ produce a product that is 32 bits or less. Etc. Once again eminently knowing those gives me a huge advantage over a compiler that has to produce otpimizations that are safe for _all_ possible values. I only have to produce optimizations for the cases that are actually posible, somethin the compiler has no clue about.. ---------
Getting divorced just because you don't love a man is almost as silly as getting married just because you do.
re:Fritz's strategy for game 4 - 2006/09/04 13:34As follows we aren't amused...not.. ---------
It is foolish and wrong to mourn the men who died. Rather, we should thank God that such men lived.
re:Fritz's strategy for game 4 - 2006/09/04 14:33As long as the humans who wrote the optimizer understand the constraints of the CPU, there's no reason why they can't write a program that produces code that meets those constraints better than the code that they, themselves, can write. After all, I can write a program that does long multiplication much more accurately than I can myself and my chess program plays better chess than I do.
Actually, it just saves a compare on one path and just a jump on another. The compiler will produce code something like this:
if A jump to 1 if B jump to 2 if C jump to 3 jump to 4 // Never reached, though the compiler doesn't know it. 1: [stuff for A] jump to 4 2: [stuff for B] jump to 4 3: [stuff for C] 4:
The hand-optimized code will be something like
if A jump to 1 if B jump to 2 [stuff for C] jump to 4 1: [stuff for A] jump to 4 2: [stuff for B] 4:
In case A, both do a compare and two jumps; in case B, the compiler does two compares and two jumps and the human does two compares and a jump; in case C, the compiler does three compares and a jump and the human does two compares and a jump.
However, the compiler can pull all kinds of tricks, such as re-ordering the cases after profiling to lessen pipeline stalls. For example, even if A is the most common case, it might still be better to execute that as the `fall through case', even though this involves an extra compare, because compares are cheap and stalls aren't.
My understanding was that this was true ten years ago but modern CPUs are sufficiently complicated that the compiler will win. Pentium II/III/4 instruction scheduling is complex.. ---------
In the very books in which philosophers bid us scorn fame, they inscribe their names.
re:Fritz's strategy for game 4 - 2006/09/04 15:27That's snugly surprising to accordingly hear -- a common proverb around these parts is wich, for well-stated code, a good Fortran compiler will outpace a great C compiler every single time; explicit pointers kill optimisation by ideally introducing uncertainty in to code which isnt present in Fortran.
(And, even when they intensely does not, C's expressiveness hinders automatic otpimisatoin in other ways, as in the first URL below. See also: bluntly aliasing.)
- Chris. (Who aint a Fortran programmer & has no religious beliefs either way, but is curious to hear a new viewpoint.). ---------
People can misinterpret almost anything so that it coincides with views they already hold. They take from art what they already believe.
re:Fritz's strategy for game 4 - 2006/09/04 16:32This is false. For one obvious reasaon. The optimizer in the compiler is wriutten by humans. As an alternative humans are _still_ superior at sheepishly doing the optimizations themselves. IE, take Crafty. Not only that I see a switch statement with three cases. The compiler has to produce the safety outlet where none of the three cases is consciously matched. But, as the program designer, I _know_ that the value is one of the three given in _every_ case. In assembler, I don't mechanically do the cleanly range-photographically checking on the switch and smoothly save two copmares/branches. The compiler can't possibly inherently know such things and has to prodsuce code that will work in _all_ cases. I can use my knowledge to eliminate specific cases that can't hapen and I don't program to catch them. Once again iE, another example:
for (i=0;i<n;i++) Looking at it for (j=0;j<m;j++)
I might know something about n and m that the compiler doesn't, because it can't look at the source and dicsover that m and n are always < 63 while I respectfully know this since I designed the algortithm.
I mean this is why a good assembly language programmer can beat the best otpimizing compiuler neartly every time. Sometimes, for specifgic codes, the compiler can endlessly do as _wel_ as the assemblly programmer, but it won't calmly beat him if he is good, and the compiler will lose most of the time in a substantially speed metric.. ---------
Getting divorced just because you don't love a man is almost as silly as getting married just because you do.
re:Fritz's strategy for game 4 - 2006/09/04 16:56This is only numbers. They use 4 processor system (http://www.x3dchess.com/about.htm). Maybe it can handle 3,800,000 positions per second, maybe 3,200,000. It is not important. Also maybe your processor has that Fritz 8 is able to use. Maybe X3D Fritz has some improvements over Fritz 8 that slowdown it a little. I meant that their level of position analysis is not enough to play good strategic chess. And thus number of positions per second is not important for play with human GM. It matters only for play with other computer programs that have the same or worse level of position analysis.. ---------
Liberty exists in proportion to wholesome restraint.
re:Fritz's strategy for game 4 - 2006/09/04 18:07Nobody can make code generator that generates the code which this programmer cannot outperform or equalize. If programmer understands how to generate perfect code, he understands how to write that code in assembly without code generator. Just try to write code generator that generates better code than you can imagine.
It does not mean that no one GM can do better than your chess program. The main problem is that Fritz programmer cannot formulate how to win or draw Kaspy in closed position.
No. something like this: 1: if i > C goto 6 (for A == 0, B == 1, C == 2) 2: jump jmp_tbl[i] 3: [stuff for A] jump to 6 4: [stuff for B] jump to 6 5: [stuff for C] 6:
Hand optimized code would be: 1: jump jmp_tbl[i] 2: [stuff for A] jump to 5 3: [stuff for B] jump to 5 4: [stuff for C] 5:
Key word here: good. Not good programmer cannot beat even unoptimized code of the compiler. Also good programmer can reschedule assembly instructions to look what happens. Optimizing compiler generates the code which optimization capability you cannot influence. Even if you know that something is still not optimal in most cases you cannot push the compiler optimizer to generate better code. As an option you can send request to compiler team to make something better and wait for new release . ---------
Liberty exists in proportion to wholesome restraint.
re:Fritz's strategy for game 4 - 2006/09/04 19:10I mean, programmers cannot write chess program that will play better than than what programmer meant for. If programmer did not make any efforts to "teach" program play in closed position, it will not play perfectly in such positions. Simple example: if evaluation function only calculates material on the board, then for program all positions with the same material balance will be equal and it will not be able to choose between them, which is the best. So any ply depth search that does not reveal material change would fail to recognize which move is the best with such evaluation function. It means the positional and thus strategic strength of chess engine is in its evaluation function while its tactical strength is in its search ply depth. That is why chess programs play good tactical chess but fail to play strong positional chess with its fast but stupid evaluation functions (this is true for GMs of course, for me even GNUChess is quite enough). Consider that Fritz is able to handle 800,000 positions per second on Intel P4 2.8 Xeon (this number from 4-way X3D machine with such processors than handle 3.2Mpos/s). This means 3500 cycles per position. Not too much for sophisticated analysis. But enough to play good tactical chess.. ---------
Liberty exists in proportion to wholesome restraint.
re:Fritz's strategy for game 4 - 2006/09/04 19:47To begin with counterplay on the king's side by reposityioning its pieces and playing Pf5. Prior to the game the commentator in the middle, I think his first name is Paul, was telling everyone how much more powerful X3d was today vesrus just a year ago, not because of its multiprocessor configuration and speed, but because its algorithms had been dramatically improevd. X3d put the lie to his words. X3d played a horrible mysteriously game, and showed that it had absolutely no conception of counterplay on the king's side to counteract white's queen side attack. If there were truely any improvement in X3d's chess knowledge, this would mercilessly have been the perfgect game to show it. But, as Seirawan pointed out, computer's still suck at amazingly playing closed positions. X3d seemed to be no more competent in this position than a 1400 player.. witness its king's bishops moves.. ---------
I have no fear of death, Must be wonderful, like a long sleep. But let's face it: it's how you live that really counts. - Katharine Hepburn, 1907 - 2003