Over the holidays I had some extra time and decided to code a simplistic chess game using alpha beta algorithm on my 030 cube. My game can be configured to search as many plys as I like. I focused on the chess engine, and kept graphics as simple command line text. I wrote the program in obj-c but treated it as C, writing it in a procedural fashion vs. object oriented.
I thought these stats were interesting. On my 030 cube running NeXT 1.0 it evaluates about 200 nodes/second. Rebooting my 030 cube under NeXT 3.2 I get about 200 nodes/second as well. On my 040 cube on NeXT 3.2, I get 4x the raw speed, about 800 nodes per second.
I FTPd the C program to my 6 year old Mac Pro with 2ghz Xeon processors and compiled with GCC. I get about 350,000 nodes per second (single threaded code)! I then tried it on my wife's new Mac Air, and it gets about 800,000 nodes per second! So, my chess program evaluates about 1000x faster on the Mac Air than on an 040 cube, and about 4000x faster than on an 030 cube.
To respond in < 10 seconds, my 040 cube can be set to 4 ply search, while a Mac Air can run a 6 ply search in similar time.
I'm not a professional programmer and have limited experience with C, so I'm sure my simple chess program has many structural deficiencies, but it does play a reasonable game of chess using an alpha beta search tree.
Anyhow, I thought it was an interesting exercise.
John
[/img]
To me it's more shocking that a macbook air is outperforming a mac pro even a 6 yr old one.
Quote from: "jroark"To me it's more shocking that a macbook air is outperforming a mac pro even a 6 yr old one.
I was surprised too. The architectures have advanced quite a bit too though over six years... I recall verifying a Westmere Xeon outperforming prior Xeons almost 1.5x... and that was 4 years ago... this is a small 120k) program running single threaded, so it may not best exploit a workstation architecture...
my timing is also for one core... the chess program pegs one modern core only, so if you consider multicore then another factor.... (60+ core die is not far off...)
anyhow that is the data my program is producing. i can share source code for any interested....