A WinBoard-Compatible Chess Program

Last updated February 11, 2008

News: Setup forums for discussion of computer chess

 


The World's Most Active Chess Club
Fimbulwinter plays on the Internet Chess Club under the account "Fimbulwinter" and its creator plays under "FailureBoy". Guests can play for free on the ICC and there are lots of perks to membership. I encourage all chess fans to check it out!

 

New:

 

If you are interested in the history of computer chess, you might be entertained by my paper "On the Romance of Regicide: The Turk, Kasparov, and Deep Blue". It's only available as a word doc at the moment. If there is enough interest, I may convert the whole thing into an HTML page. It's a large download because I included a lot of historic pictures. If you just want to read the text, it's up on my blog as the May 8th, 2005 entry.

 

 

seg-faults and counting!

 

So what's the deal here, you may be asking yourself. What is this Fimbulwinter of which I speak? In its traditional context of Norse Mythology, Fimbulwinter is the three year long freeze that enprisons the world before Ragnarok, the last battle. It's the kind of twilight of the gods, man versus diety, story that exists in many cultures. So what does the nordic apochalypse have to do with the age old game of kings? The human masters of chess are currently in the process of being overthrown by a new generation of silicon chess players that in the future will be all but unbeatable.

Of course, Fimbulwinter isn't going to be winning any chess championships any time soon - I'm running it on a 500Mhz laptop. It's really just something I'm tinkering with. Fimbulwinter plays on the Internet Chess Club server (a great place to play chess online - and it's free, though registered users additional functionality). If any one is interested in up to date Fimbulwinter stats, log on to the ICC and type "fi fimbulwinter". You can also challenge it to a game.

Playing against Fimbulwinter can be done in one of two ways: the right way, and the wrong way. The wrong (or, at least, clunky) way to do it is to just run the Fimbulwinter program. You'll be met with a console window that looks a lot like this:

Ewwww.... Too DOSy for most people. It's a great interface to use to debug the program, but not so great to actually play a game. Especially since, as of this writing, there is no built in help command. Moves are entered in co-ordinant notation ("d2d4" or "e7e8r" to promote). You could always grok through the code to figure out what commands the program accepts - but that's too much like using Unix. What you want is to get Tim Mann's WinBoard and set up Fimbulwinter to use it. That way, instead of the ugliness above, you'll get this:

Which is very nice. You can even change the piece sets and the colors around until they suit your senses aesthetically. Here is my attempt to play the Paris Game against Fimbulwinter 2.01. What a miserable affair that was. But I don't claim to be a very good chess player (I'm not). To get WinBoard to recognize Fimbulwinter as a pluggable engine, you have to open up WinBoard.ini, once you've installed WinBoard, and add the line "Fimbulwinter_2_01" at the end of the file, inside the quotes that follows "/firstChessProgramNames=". Here's what my setup looks like:

/firstChessProgramNames="

GNUChess

crafty

fimbulwinter

fimbulwinter_2_0

fimbulwinter_2_01"

Make sure that the name of the engine you add to the list matches that of the engine's executable ("Fimbulwinter_2_01.exe" corrosponds to "Fimbulwinter_2_01" in the list, and so on). There are many other WinBoard compatible chess programs out there. You can get a couple of them and have them play matches against themselves.


Downloads

Enough talk. Let's get to the downloads. The following are the compiled versions of Fimbulwinter that are currently available for download. To learn about the different versions, check the version history below. If you're not a programmer, and just want to play a game, I'd recommend simply getting the newest version. Unless, in addition to being computer illiterate, you're a terrible chess player - in that case, get version 2.00.

 

Chess Engines Opening Books File Format
Fimbulwinter 5.00 - December 8, 2002 ICCF 10,000 Games (1.34 MB) .FIM - version 3.00 (Fimbulwinter 5.00)
Fimbulwinter 4.10 - November 24, 2002 ICCF 10,000 Games (1.33 MB) .FIM - version 2.00 (Fimbulwinter 4.10)
Fimbulwinter 4.00 - November 20, 2002
 
Fimbulwinter 3.10 - November 10, 2002  
Useful 3rd Party Tools
Fimbulwinter 3.00 - September 9, 2002  
PGN Trim - Those of you out there trying to make your own opening books and are frustrated by Fimbulwinter's intolerance of minor glitches in PGN files, might try running the file through this first - it will trim out a lot of the garbage.
Fimbulwinter 2.03 - August 2, 2002  
Fimbulwinter 2.02 - July 31, 2002  
Fimbulwinter 2.01 - July 29, 2002  
Fimbulwinter 2.00 - July 28, 2002  

 

Source Code

And here is the Fimbulwinter source code that I am currently offering. The different incarnations of Fimbulwinter are all built in Microsoft Visual C++ 6.0, but as they are straight C, they may compile in other compilers, and maybe even on other operating systems, though I have used a few Win32-dependent functions. I don't care about writing portable things, but if you successfully port Fimbulwinter to another operating system, email me and I'll put your version here too. Maybe other people can learn from it. People interested in a very simple, bare-bones implementation of a chess engine should look at version 2.00. It implements all of the rules of chess, and does a fixed, 4 ply MiniMax search through board positions, and can play on ICC through WinBoard.

Fimbulwinter 5.00 Source - December 8, 2002 (dynamic Zobrist key generation, working q-search, pawn evaluation code, bugfixes)

Fimbulwinter 4.00 Source - November 20, 2002 (fixed hashing, opening book functionality)

Fimbulwinter 3.00 Source - September 9, 2002 (alphabeta search, hashing)

Fimbulwinter 2.00 Source - July 28, 2002 (basic program)

Fimbulwinter owes a special thanks to Tom Kerrigan and his Simple Chess Program (TSCP). Fimbulwinter borrows a lot of the xboard interface code and some data structures from Tom's great program. Unfortunately, the last time I checked, Tom's page is no longer available online.


Version History

2.00

First public release of Fimbulwinter. All of the rules of chess are implemented including castling, en passant captures, 3-fold repetition, promotion, ect, ect... The basic board manipulation code appears to be bug-free. Precomputed move arrays are used to aid in fast move generation (as fast as bitboards?) A simple, full-breadth (exhaustive) MiniMax search is conducted of the game tree to a fixed depth of 4-ply. The evaluation function is primative (and, I noticed today, possibly buggy) - weighing only a few aspects of a given position like material and the piece placement of pawns, bishops, and knights. Rooks, besides there material count, aren't even mentioned in the evaluation code. I was very surprised that on ICC, even this hobbled program could maintain a rating nearing 1400. I mean to include a benchmark facility in the next version of Fimbulwinter - for now, I just ran the computer player from the openning position for 5 ply to see how long it took.

Summary:

* ICC-capable

* Precomputed move arrays

* MiniMax fixed-depth search

* Primative evaluation function

Benchmarks:

Hardware: 500 Mhz IBM ThinkPad 600X, 384MB RAM

Straight run from the opening position

ply: 5, nodes: 5071893, score: 100, pv: d2d4 d7d5 b1c3 e7e5 c3d5

Execution time: 35.7 seconds, 5071893 nodes, 142077 nodes per second

ICC Performance:

Time Rating Win Loss Draw Total Best
Bullet 1082 20 14 1 35 1092 (30-Jul-2002)
Blitz 1327 17 13 3 33 1388 (29-Jul-2002)
Standard 1413 25 16 4 45 1423 (29-Jul-2002)

2.01

This was really really minor release that features slightly better move timing (not managing time, just keeping track of how long it takes to traverse the game tree) and a king safety heuristic in the board evaluation code that kicks in during the endgame. It works like this: for each side's king, a bonus is given for every friendly piece next to it, a penalty is assessed for non-open squares around the king (presumably limiting mobility), and a larger penalty is given for each adjacent square that is under attack by the other side. I hope that all these things together will let Fimbulwinter play a better endgame. Right now it has problems even winning when it's K+Q vs. K.

Summary:

* King safety evaluation added

Benchmarks:

None taken - performance is basically the same as version 2.00

ICC Performance:

I started playing version 2.02 online before I could get a good idea of whether an added king safey measurement helped at all.


2.02

Lots going on in this new release. Most notably, I replaced the fixed-depth MiniMax search function with an AlphaBeta search that will go to different depths depending on how much time is left on the computer's clock (at least when it's playing online). My alpha-beta search uses a primitive kind of move ordering in order to find cutoff moves fast - it first evaluates promotions, and then captures. I also added the same "bench" command that Tom Kerrigan's Simple Chess engine has to facilitate comparison between my program and his. I basically wanted to see at this point whether using pregenerated move arrays beats his scheme. The function loads the position from move 17 of the game of Bobby Fischer vs. J. Sherwin, New Jersey State Open Championship, 9/2/1957. Then, by turning on the computer opponent for white, one can see how long it takes to get 5 ply deep into the game tree. I'm working on adding support for loading FEN files to enable different benchmarks, as well as adding support for EPD test suites through Bruce Moreland's (brucemo@seanet.com) EPD2WB utility. For some reason my nodes per second dropped by about 40% (though search speed to get to a given depth increased about 2000% due to alpha-beta pruning) in this release - I'm going to see what I can do about that in a future version.

Summary:

* AlphaBeta search with some move-ordering

* New benchmark facility

* New time-management code

* Searches deeper

* "help" command prompt function lists commands

Benchmarks:

Hardware: 500 Mhz IBM ThinkPad 600X, 384MB RAM

Straight run from the opening position:

ply: 5, nodes: 133106, score: 90, pv: d2d4 b8c6 e2e4 g8f6 b1c3

Execution time: 1.595 seconds, 133106 nodes, 83452 nodes per second

"Bench" position:

ply: 5, nodes: 259362, score: 331, pv: c2a4 f7f6 a4a7 f6g5 a7b8

Execution time: 2.935 seconds, 259362 nodes, 88368 nodes per second

ICC Performance:

Time Rating Win Loss Draw Total Best
Bullet 1484 68 31 2 101 1484 (01-Aug-2002)
Blitz 1469 76 34 3 113 1560 (01-Aug-2002)
Standard 1518 65 28 7 100 1583 (01-Aug-2002)

 


2.03

Fimbulwinter now has some kind of quiescent searching capabilities, which are probably rather buggy. In one test position, after 5 seconds of thinking, Fimbulwinter claimed to have taken its quiescent search 14 ply deep into the game tree. It's just a little bit suspicious. I know that it is positively affecting Fimbulwinter's play, however, since it's online ratings jumped 300 points. The two things that are holding it back now are it's fixed 5-ply alphabeta search (it should look deeper, if it has more time) and the lack of an opening book. Fixes for this are in the pipeline. Fimbulwinter can now also load positions saved in FEN notation. Coupled with WinBoard's ability to produce .fen files, this will be very helpful in designing test positions that make sure all of Fimbulwinter's bits and pieces are working correctly (which they are not - WinBoard will occasionally throw "Illegal Move" messages at me).

Summary:

* Quiescent search implemented

* Fimbulwinter can now load FEN positions

Benchmarks:

None taken at this point. I'll be adding some stats-gathering functions in a future version to test alphabeta-branching and Q-Search depth and some other things.

ICC Performance:

Time Rating Win Loss Draw Total Best
Bullet 1674 87 32 3 122 1674 (02-Aug-2002)
Blitz 1713 121 46 4 171 1733 (02-Aug-2002)
Standard 1784 132 60 9 201 1952 (01-Aug-2002)


3.00

Ok, it's been a while since I've posted an updated copy of Fimbulwinter, so I thought I'd release my working copy of version 3.00 today. Not all the features that I was planning for 3.00 are in it, but once I get a couple of bugs ironned out, they shouldn't take long to add. The big addition to Fimbulwinter in version 3.0 is a positional hash table that stores the board evaluations from previous AlphaBeta searches and throws them into a table for possible later use. In this way, Fimbulwinter does not waste time calculating transpositions. Currently, with a 24 MB hash table (a million entries), queries that Fimbulwinter makes to the table result in hits about 25% of the time in tactically complex positions. This results in a significant speed increase and will allow me to implement a more CPU-expensive (and hopefully more effective!) board evaluation function, since it won't be being called all of the time. Hashing in Fimbulwinter has not been optimized yet, as full Zobrist keys are being generated from scratch for each new position where one could instead just XOR the pieces in and out. I expect that this will add even more speed. There are other uses, too, for the hash table like three fold position repetition detection and possibly caching pawn structure evaluations. I'm planning to investigate these in the future. On the immediate horizon for Fimbulwinter now (once I get hash table-enabled quiescent searching working in a non-buggy way) is to initialize the hash table with an opening book at the beginning of each game so that it stops doing silly things in the first couple of moves.

Also, starting with version 3.00, the hardware that supports Fimbulwinter's online ICC presence was upgraded from a 500Mhz machine with 384 MB RAM to a brand new 1.9Ghz monster with 512 MB of 266 Mhz DDR RAM (important now that I'm using hash tables). So far, Fimbulwinter's online scores have not been CPU-limited because I've been running searches to a fixed depth, without regard for the time on the clock. And since I was only searching to 5 ply, Fimbulwinter on the 500Mhz machine only took about 4 seconds to think on a move, at the max. Running old versions of Fimbulwinter on my new machine would be faster, but it wouldn't search more moves or mae different moves than on the old machine. So the new ICC scores are still comparable to the old ones when considering the strength increase of the program. So far. But with the added speed of transposition tables, plus a CPU that's four times faster than my old one, I've been able to crank up the fixed depth alpha beta search to 6 ply instead of 5. That alone, I suspect, will be enough to garner Fimbulwinter another 200 rating points (that's the general rule in chess programming: one more ply = 200 points better play). There's a little bit of new time management code that prevents Fimbulwinter from searching to 6 ply until the middle game, where it is most time efficient to do so. Also, when Fimbulwinter starts to run out of time, the max full-breadth alpha beta search depth will be rachetted down to 5, 4, and then 3 ply. At 3 ply, it takes longer to send packets to ICC than it does to think about the position. More sophisticated timing code is in the pipeline (and half implemented already, if you look at the source).

The quiescent search function in this version is 99% gauranteed to be buggy. I think I have a rogue pointer out there, because Fimbulwinter claims to be doing Q-searches 23 ply deep, at times, but, try as I will, I can't set a breakpoint to capture when this is happening. I left the Q-search (from version 2.03) in, buggy as it is, because it seems to helping Fimbulwinter avoid search horizon blunders. But it's not perfect. The version I wrote that uses hashing is even more messed up, and that's top on the list of fixes to make at the moment. Stay tuned.

Bug update: It seems that the TAlphaBeta function is buggy too. The bug doesn't seem to affect playing strength, but sometimes the PV is only two or three moves long. I think I've got a handle on what the problem is and it will be fixed shortly.

Note: The pre-compiled version of Fimbulwinter 3.00 is set to use a 24 MB hash table. If you don't have 24 MB of physical RAM lying around, and you run the program, your hard drive will trash around like nothing while constantly hitting you VM swap file. Your nodes per second will slow to about 23. But even an Etch-a-Sketch has more than 24 MB of RAM these days, so you should be fine. If you have a high end machine with gigabytes of RAM, you can download the Fimbulwinter source, change the TABLE_MEMORY_MB constant in hash.h to something like 2000, and Fimbulwinter will make the best use of your system's resources. It won't make much difference yet, but for future versions, it definately will.

Summary:

* Transposition table support

* Changed fixed alpha beta search depth from 5 ply to 6.

* Modifications to the very crude time management functions so that Fimbulwinter won't lose on time so much - or at least not so poorly.

* Fixed bug that caused promotion on A8 to freeze up the program

* Fixed nasty hash bug where the program would run only from a debug compile :-(

* Fixed bug where computer_side being uninitialized in main made program crash occasionally

Benchmarks:

Hardware: 1.9 Ghz Dell Inspiron - 512 MB 266 Mhz DDR RAM (24 MB Hash Table)

Straight run from the opening position:

ply: 6, ABnodes: 962213, Qnodes: 1175711, total nodes: 2137924 score: 0, pv: d2d4 d7d5 b1c3 b8c6 g1f3 g8f6

Execution time: 6.339 seconds, 2137924 total nodes, 337265 nodes per second

Max quiescent depth: 19 ply

"Bench" position:

ply: 6, ABnodes: 1127422, Qnodes: 4057411, total nodes: 5184833, score: 66, pv: b2b3 b6b5 b3c4 b5c4 g5e4 d6c6

Execution time: 18.63 seconds, 5184833 nodes, 278350 nodes per second

Max quiescent depth: 23 ply

ICC Performance:

Time Rating Win Loss Draw Total Best
Bullet 1836 143 41 5 189 1872 (07-Sep-2002)
Blitz 1768 238 75 10 323 1892 (06-Sep-2002)
Standard 1922 220 86 16 322 1952 (02-Aug-2002)

 


3.10

I got the rudiments of book support working the other day, but must wait until I can write a converter to export PGN files to my engine's native coordinate notation before releasing a version of Fimbulwinter that can hold its own in the opening. As a test of book support, just to mess around with people, I had Fimbulwinter playing the Paris Attack (1. Nh3 ...) for a couple of hours, which was kind of amusing. In any case, said converter won't get finished until at least the 14th, as I have a rather extensive biology midterm to study for. But I thought it was kind of important to get a nice, bug free (jinx) version of Fimbulwinter out there. I think this will be the first one. Q-search is out for a while until I can come up with a solution for preventing node explosion, but hashing is finally working flawlessly - all that's left to do there is to modify and cache the Zobrist keys during move generation. I'm expecting this to add perhaps another 20,000 nodes per second to the search speed. And there's a couple more optimizations that I've been thinking about too. But all this will have to wait for version 4.0. As a side note, with Q-search out, I was able to knock the ABsearch depth up a notch to 7 ply during the midgame, in online games, I've found that this actually increases the strength of Fimbulwinter by about 30-50 points (or, at least, I have new high scores in Standard and Bullet), even though it's now vulerable to search horizons blunders again. Looks like the next batch of improvements will push Fimbulwinter up over 2000! Woot...

Summary:

* Bug-less transposition table (fixed at 64 MB) support

* Changed fixed alpha beta search depth from 6 ply to 7.

Benchmarks:

Hardware: 1.9 Ghz Dell Inspiron - 512 MB 266 Mhz DDR RAM (64 MB Hash Table)

Straight run from the opening position:

ply: 7, ABnodes: 1197319, score: 100, pv: d2d4 c7c6 b1c3 d7d5 g1f3 e2e4

Execution time: 4.106 seconds, 1197319 total nodes, 291602 nodes per second

"Bench" position:

ply: 7, ABnodes: 8080520, Qnodes: 4057411, score: 280, pv: b2b3 f7f5 b2c4 d5f6 c1b2 e6e5 e1e5

Execution time: 27.08 seconds, 8080520 nodes, 298405 nodes per second

ICC Performance:

Time Rating Win Loss Draw Total Best
Bullet 1752 435 150 38 623 1909 (05-Nov-2002)
Blitz 1741 522 168 35 725 1892 (06-Sep-2002)
Standard 1901 521 190 28 739 1990 (05-Nov-2002)


4.00

I got opening book support working! Fimbulwinter can take any PGN game database, extract moves from it, and create an opening book from it. Fimbulwinter will then scan the book for moves to make during the first 20 ply of the game to see if there is a given move for the current position. If one exists, it will be played. In the future, I hope to support book learning. The rudiments to allow for this are already in place. I just need to finalize on a book file format. Right now my book implementation is a little hackish, if fiendishly clever. Fimbulwinter makes books by parsing a PGN file, playing through each move in each game, and generating a Zobrist hashkey for each position. That key and the corrosponding move made in the saved game are then saved to disk in a large binary file. These keys are then read into the chess engine when it boots up. Everytime the computer looks to make a move, before it dives into alphabeta searching, it checks a large array of keys to see if there is a move stored for the current position. If there is, it's played. If there are more than one, one is chosen at random. I'll but putting up instructions on how to make your own opening books for Fimbulwinter soon - right now the PGN parsing function is still hits little hiccups when munching PGN files with strange glyphs in them. You can always give a look at the source code to see how it's done, the console command is "makebookpgn". I'll be making changes in the future that will make making opening books easier. A good place to get PGN database files is: ICCF game archive.

It seems that perhaps when I added book support, I either broke something else or I compiled my opening book from a database with a number of opening bloopers in it, as Fimbulwinter's strength has not gone up since 3.10. I'm thinking that perhaps the biggest performance bottle-neck now is the lack of a q-search function and a better evaluation function - so that's next on the block. Look for a considerably stronger version 4.10 in a couple of days.

Attention chess programmers! I looked around for a long time looking for code that could convert SAN move notation to coordinate notation and couldn't find anything. Anyone looking for such a routine should feel free to lift it from my code.

Summary:

* Opening book support!!!

* Compiles opening books with "makebook" and "makebookpgn"

* Fimbulwinter can now take moves in SAN notation as well as coordinate notation in console mode. I don't imagine many of you out there are using Fimbulwinter in console mode, but there it is.

Benchmarks:

No changes have been made to the core engine to change the benchmarks over version 3.10 (see above).

Hardware: 1.9 Ghz Dell Inspiron - 512 MB 266 Mhz DDR RAM (64 MB Hash Table)

Create opening book from "fimtest.pgn" - parsed 5173 games in 672.531 seconds

ICC Performance:

Time Rating Win Loss Draw Total Best
Bullet 1726 488 173 42 703 1909 (05-Nov-2002)
Blitz 1691 595 191 40 826 1892 (06-Sep-2002)
Standard 1952 545 196 30 771 1990 (05-Nov-2002)

 


4.10

Ok, so version 4.00 was sinfully buggy. This release will hopefully clean up some of that. I've been tinkering with a lot of engine features, so it's really hard to isolate the problem when a bug does surface. There's still an occasional problem when running Fimbulwinter under winboard when, while making moves from the opening book, the engine will attempt to play an illegal move (This occurs rather rarely when playing online - I've run Fimbulwinter for more than 24 hours at a time without observing it). This is top on my list of things to fix, but I don't think that I'll find the bug tonight, and it doesn't look like I'll get to fixing it until at least Wednesday. In addition to bug fixes, I've got a lot of interesting additions to Fimbulwinter that I'm working on that I hope will push the engine into the upper echelons of master play on the ICC. We'll have to see how that works out.

Starting with version 4.10, the opening books for Fimbulwinter are being supplied separately from the engine. This is to help me conserve disk quota on my Stanford web account. I won't have to supply a multi-megabyte book file with the engine everytime I produce a bug-fix. Version 4.10 is hard-coded to use iccf10k.fim as the opening book (available for download with the engine above). All future versions will allow the user to choose an opening book either at runtime or through a .ini file. Just download the opening book, unzip it, and put it in Fimbulwinter's directory and the engine should find it (it will tell you so, if you run it in console mode).

After a bit more testing, it would seem that what ever problem was making version 4.00 play badly, it has now been fixed. Fimbulwinter reached an all time rating high of 2006 in standard last night. After I put a fixed q-search function back into the engine, which will eliminate most search horizon bugs, Fimbulwinter's strength should increase a couple hundred points.

Summary:

* Opening book compilation now more than a hundred times faster! There was a huge bottleneck (memsetting the 64 MB hash table every game parsed) that was hogging CPU cycles for no purpose. I love my profiler. It's so neat!

* Fixed bug where the opening book would interfere with letting the computer play a position loaded from disk by playing (illegal) moves from the book instead of doing a proper search.

* Fixed bug where Fimbulwinter version number display would be garbled when running under winboard.

* Gave my poor hard drive a break by changing the engine so that the opening book is not reloaded at the end of every game.

* Fixed bug where sometimes Fimbulwinter wouldn't catch that the game was over at the right time (both in console and winboard mode). The same bug will manifest when one attempts to load in a won (opponent is checkmated) board position and tells the computer to play from it.

* Fixed at least some of the bugs that caused Fimbulwinter to throw illegal move errors when running under winboard.

* Provided opening book contains twice as many (10,000) games in it as the one provided with version 4.00.

* Implemented versioning control on opening book files (so if in the future I change the opening book file format, Fimbulwinter will tell you when your book files are out of date).

Benchmarks:

No changes have been made to the core engine to change the benchmarks over version 3.10 (see above).

Hardware: 1.9 Ghz Dell Inspiron - 512 MB 266 Mhz DDR RAM (64 MB Hash Table)

Create opening book from "fimtest.pgn" - parsed 5173 games in 5.838 seconds

ICC Performance:

Time Rating Win Loss Draw Total Best
Bullet 1727 611 219 54 884 1909 (05-Nov-2002)
Blitz 1811 689 215 49 953 1892 (06-Sep-2002)
Standard 1941 606 219 32 858 2006 (27-Nov-2002)

 


5.00

Fimbulwinter 5.00 is a consolidation of a lot of half-baked and semi-working functionality and features from previous versions. There has been a little (not too much yet) optimization of the core engine code to make Fimbulwinter generate moves faster (by dynamically maintaining the Zobrist hash key of the current position), resulting in a 5% speed up of search speed. However, this version sports a more complicated evaluation function that takes pawn structure into account (previous versions really didn't), which improves Fimbulwinter's play, but slows down raw search speed. Testing shows that the tradeoffs seem to be worth it. What Fimbulwinter really needs is a special evaluation function to use in the endgame, which is where Fimbulwinter loses to human players the most. I'm still not getting the most out of my transposition tables - right now I'm only using them to cache position evaluations - in the future I will also be using them to improve move ordering. Fimbulwinter's branching factor averages about 12 nodes per tree level - from what I've read it can be gotten down to between 6 and 8. Another improvement for the future that will help is implementing a null-move heuristic. As soon as I figure that out, it'll be in there.

The two biggest features in Fimbulwinter 5.00 is the return of the quiescent search function (finally seems to work well (or at least okay)) and the addition of an INI file so that users can configure the engine without having to recompile. Right now the only two INI keys are for setting the transposition table size and the opening book file. I'll be adding more in the future, but those are really the most important. Note that version 5.00 uses an 8 MB hash table by default - this is a bit small, if you have the memory you should definately set it to at least 64 MB.

To those of you out there trying to make your own opening books for Fimbulwinter, it's very important that your PGN file that you are trying to make the book from is strictly adherent to the PGN standard and has no funny stuff in it (tags, annotations, or variations). PGN is a pain to parse and catching all of the variants that people use is not worth my time. The best way to parse a file is to run Fimbulwinter in debug mode out of MSVC and fix the code so that it can tolerate any errors that come up (if anyone writes a bullet-proof PGN read function, please email me!) - but that's way too much like using Unix for most people to deal with. The second best way is to try running the PGN file that you are trying to convert through a normalizer like PGN Trim and then running the output file through Fimbulwinter. Fimbulwinter's I/O abilities will get better in the future. Equipping Fimbulwinter with a stronger book (The ICCF one that I'm using now seems to have some idiot moves in it) might raise the engine's rating by 50-75 points.

Summary:

* Fixed incredibly stupid error in generating Zobrist hashkeys that would cause keys dealing with castling and en passant captures to possibly clump.

* Book I/O Version has changed to 3.00 as a result of the opening book's dependency on how hashing works.

* Book size no longer hard coded into the engine (boy was that stupid).

* Fixed the IsLegalMoves() function so that it actually works. What I had there before was bogus and would sometimes cause Fimbulwinter to jump out of book and think for itself when it had a book move available.

* Dynamic Zobrist Key maintainance saves somewhere around 5% of the CPU time spent searching through moves. Tests on my 1.9 Ghz machine indicate the speedup is somewhere around 10,000 nodes per second. Mileage may vary, as I tinker around with the evaluation function.

* Improvements made to evaluation function, added pawn evaluation code.

* Fimbulwinter now supports configuration through an INI file.

* Working q-search function.

Benchmarks:

Hardware: 1.9 Ghz Dell Inspiron - 512 MB 266 Mhz DDR RAM (64 MB Hash Table)

"Bench" position search to 6 ply with q-search enabled: (Bfact is the branching factor of the game tree)
PV: h2h4 h7h6 g5e4 d6c6 h4h5 g6e7
Bfact: 7.93 18.61 3.02 33.45 1.85 AveBfact: 12.97
QBfact: 43.11 1.63 11.36 8.87 2.92 AveQBfact: 13.58
Total ABnodes: 1936622, Total qnodes: 4030797, Total nodes: 5967419
Execution time: 21.97 seconds, 271604 nodes per second
Max quiescent depth: 23

ICC Performance:

Time Rating Win Loss Draw Total Best
Bullet 2035 834 267 75 1176 2095 (06-Dec-2002)
Blitz 1994 1076 304 66 1446 2052 (01-Dec-2002)
Standard 1952 785 285 47 1117 2026 (29-Nov-2002)

 

 


6.00

 

Summary:

* Optimized the alphabeta search so that moves which cause beta cutoffs are also added to the history table (previously only alpha cutoffs were being saved). This might be viewed as more of a bugfix. In a series of matches with Fimbulwinter 5.00, Fimbulwinter 6.00, without any other 6.00 improvements walked away with a 21.0:15.0 result against the earlier program - so it seems like this improves the search in a non-trivial way.

Benchmarks:

Hardware: 1.9 Ghz Dell Inspiron - 512 MB 266 Mhz DDR RAM (64 MB Hash Table)

"Bench" position search to 6 ply with q-search enabled: (Bfact is the branching factor of the game tree)
PV: h2h4 h7h6 g5e4 d6c6 h4h5 g6e7
Bfact: 7.93 18.61 3.02 33.45 1.85 AveBfact: 12.97
QBfact: 43.11 1.63 11.36 8.87 2.92 AveQBfact: 13.58
Total ABnodes: 1936622, Total qnodes: 4030797, Total nodes: 5967419
Execution time: 21.97 seconds, 271604 nodes per second
Max quiescent depth: 23

ICC Performance:

Time Rating Win Loss Draw Total Best
Bullet 2035 834 267 75 1176 2095 (06-Dec-2002)
Blitz 1994 1076 304 66 1446 2052 (01-Dec-2002)
Standard 1952 785 285 47 1117 2026 (29-Nov-2002)

 

 

 

See my other programming projects at: Shedletsky's Code Page

See all of my other wacky stuff at: Shedletsky's Nexus

And the digital age trundles on...