The Spear Program
May 29th 2009: New version release (SpearCSA2009v1.5)
Download:
The Spear engine for Shogidokoro (CSA Tournament 2009 version 1.5, 51MB)
Changes in the CSA Tournament 2009 version 1.5:
- Bug fix: Option of using the opening book for a limited number of moves was ignored. This problem was fixed.
Main features
All the options in Shogidokoro are supported:
- Plays according to any time control, including byoyomi.
- Takes or gives any of the handicaps listed in Shogidokoro.
- Can think in opponent time (pondering).
- Has a reasonably good tsume shogi solver that can be used for analyzing games, although there are much better ones.
- Dynamic allocation of hashtable size. (Bigger hashtables will improve playing strength, but Spear will also run properly on PCs with less memory by adjusting this value in Shogidokoro.)
Special options for the Spear engine:
- Ten different playing levels. Level 10 is identical to the version that played in the CSA Computer Shogi World Championship.
- Option to run the engine in parallel on up to 64 processors (only tested for 4 processors or less).
- Option for setting the number of moves the opening book is used.
Not supported:
- The Spear engine doesn't send the percentage of hash usage to Shogidokoro. The reason for this is that I don't
know how to calculate this percentage for the current implementation. Therefore, it is unlikely that this will be
added to the engine anytime soon.
- The protocol that is being used in Shogidokoro is slightly different from the original USI protocol.
Spear has only been tested under Shogidokoro, so it is likely there will be problems if Spear is used with other USI based interfaces like WinBoard.
Installation instructions
Spear is now an engine that can be used with Shogidokoro and is no longer
a stand-alone application. If you can read Japanese and if you are interested in all the information about Shogidokoro,
including an explanation about how to make your own shogi engine, have a look at
the Shogidokoro website.
If you cannot read Japanese, follow these steps to install Shogidokoro and the Spear engine:
- Download the latest version of
Shogidokoro.
The dowload you need is the second link from the top, the one with a version number in the Japanese. (The top link has "Lesserkai" in it, which is the sample code
program that will be very helpful if you want to make a Shogidokoro engine yourself).
- Unzip this file in a directory somewhere.
- Try to start Shogidokoro. If Shogidokoro doesn't start up, make sure that you also have
.NET Framework (English Version)
or .NET Framework (Japanese Version)
installed (version number 2.0 or higher). Also, the latest updates for Windows are needed.
- Download one of the Spear engines for Shogidokoro.
- Unzip this file in a directory somewhere.
- Add the Spear engine to Shogidokoro:
- Start up Shogidokoro (NOT the Spear engine!!)
- Select "Engine Manager..." from the "Game" menu.
- Select "Add..."
- Go to the directory where the Spear engine files are installed and click on "SpearShogidokoro.exe"
- The Spear engine can now be used in Shogidokoro to play against (with or without handicap) or to play
against other engines. Shogidokoro comes with one standard (rather weak) engine called Lesserkai. Here is a
list (in Japanese) of the other engines that can be used with Shogidokoro:
http://shogidokoro.starfree.jp/enginelink.html
About Spear
Spear stands for Shogi Pattern Evaluator and Recognizer and is a shogi
program I originally developed to get data for my research into the pattern
recognition of expert game players.
However, during my years at the Electrotechnical Laboratory in Tsukuba
(1995-2001) the program slowly became a research goal in itself. Currently
Spear is a fully featured shogi program including:
- A state-of-the-art search algorithm
- A powerful Tsume Shogi solver
- A large opening book (more than 900,000 positions)
- Parallel search
Despite these efforts, the program is still no match for the strongest
commercially available shogi programs. However, a testimony of its improved
strength are the results in the CSA Computer Shogi World Championships.
Spear has been participating in this tournament since 1997 with the
following results:
- 1997: 3-4 in the first preliminary stage (20th place)
- 1998: 4-3 in the first preliminary stage (7th place)
- 1999: 3-2 in the first preliminary stage (7th place)
- 2000: 6-1 in the first preliminary stage (3rd place), 3-6 in the second preliminary stage (19th place)
- 2001: 5-2 in the first preliminary stage (4th place), 5-4 in the second preliminary stage (13th place)
- 2002: 3-6 in the second preliminary stage (17th place)
- 2003: 3-6 in the second preliminary stage (20th place)
- 2004: 5-2 in the first preliminary stage (7th place), 3-6 in the second preliminary stage (17th place)
- 2005: 5-4 in the second preliminary stage (13th place)
- 2006: 3-6 in the second preliminary stage (19th place)
- 2007: 6-1 in the first preliminary stage (2nd place), 5-4 in the second preliminary stage (9th place)
- 2008: 5-4 in the second preliminary stage (12th place)
- 2009: 5-4 in the second preliminary stage (9th place)
Available releases
Release history
May 28th 2009: SpearCSA2009v1.5 released
Changes in the CSA Tournament 2009 version 1.5:
- Bug fix: Option of using the opening book for a limited number of moves was ignored. This problem was fixed.
May 28th 2009: SpearCSA2009v1.4 released
Changes in the CSA Tournament 2009 version 1.4:
- Bug fix: Error in the conversion of SFEN positions was fixed.
May 19th 2009: SpearCSA2009v1.3 released
Changes in the CSA Tournament 2009 version 1.3:
- Bug fix: Changed the interaction between engine and Shogidokoro to a more recent version of the Lesserkai code. The engine sometimes missed
commands sent by Shogidokoro, but this should now be more stable.
May 15th 2009: SpearCSA2009v1.2 released
Changes in the CSA Tournament 2009 version 1.2:
- Bug fix: The answer to mate search was not displayed. This was fixed.
May 14th 2009: SpearCSA2009v1.1 released
Changes in the CSA Tournament 2009 version 1.1:
- Bug fix: Engine crashed if no hashtable memory was allocated. The default memory size used for the hashtables is now set to 32MB.
- Bug fix: Fixed a bug with infinite time limit that was re-introduced.
May 12th 2009: SpearCSA2009v1.0 released
Changes in the CSA Tournament 2009 version 1.0:
- Engine: A completely new evaluation function was implemented which was tuned automatically using
the Bonanza learning method.
- Engine: Static mate-in-one detection was implemented to improve endgame play.
- Engine: The use of futility pruning was extended.
- Engine: The opening book was increased from 100,000 to 900,000 positions.
To test the strength of the new engine, SpearCSA2009v1.0 played a 100 game match against SpearCSA2008v1.4
(15 minutes per side, one core each). This match ended 76-24 in favour of the new engine.
October 31st 2008: SpearCSA2008v1.4 released
Changes in version 1.4:
- Bug fix: A bug in the time control that made the program run forever without reporting
anything in the "Analyse..." mode was fixed.
- Bug fix: Even with infinite time, the program stopped after 12 iterations. This bug
was fixed.
No changes were made in the level of play.
June 11th, 2008: SpearCSA2008v1.3 released
Changes in version 1.3:
- Bug fix: It was brought to my attention that memory allocated to the hash tables was not freed when
the memory allocation was changed. This can potentially lead to a memory overflow, so this problem was fixed.
- Bug fix: I promised that the program would have the option to run on 64 processors, but
it allowed only 32 or less. Also, the option window allowed 0 processors, which is obviously wrong. Fixed this and now the option has the
correct range from 1 to 64 processors.
No changes were made in the level of play.
June 4th, 2008: SpearCSA2008v1.2 released
Changes in version 1.2:
- Bug fix: Important bug in the translation of SFEN positions found and fixed. This bug caused the engine to play illegal pawn drops in handicap games.
No changes were made in the level of play.
June 3rd, 2008: SpearCSA2008v1.1 released
Changes in version 1.1:
- Added feature: tsume shogi solver can be called in any position
- Added feature: dynamic hash table size allocation.
- Bug fix: In consecutive play mode the engine would not start a new game in case of a jishogi win declaration.
- Bug fix: Resigning one move too late when running out of time.
- Bug fix: Minor bugs in handling the USI commands sent by Shogidokoro were fixed.
- Tweak: Changed the balance in the playing levels.
No changes were made in the level of play.
May 23rd, 2008: First release of the Spear engine for Shogidokoro (SpearCSA2008)