Computer shogi is a field of artificial intelligence concerned with the creation of computer programs which can play shogi. The research and development of shogi software has been carried out mainly by freelance programmers, university research groups and private companies. By 2017, the strongest programs were outperforming the strongest human players.

Game complexity

Shogi has the distinctive feature of reusing captured pieces. Therefore, shogi has a higher branching factor than other chess variants. The computer has more positions to examine because each piece in hand can be dropped on many squares. This gives shogi the highest number of legal positions and the highest number of possible games of all the popular chess variants. The higher numbers for shogi mean it is harder to reach the highest levels of play. The number of legal positions and the number of possible games are two measures of shogi's game complexity.

The complexity of Go can be found at Go and mathematics. More information on the complexity of Chess can be found at Shannon number. GameBoard SizeNumber of PiecesNumber ofDifferent PiecesPer SideLegal PositionsPossible GamesAverage GameLengthChess6432610471012370Xiangqi9032710401015095Janggi90327104410160100Shogi81408107110226115Xiaohong Wan, Daisuke Takano, Takeshi Asamizuya; et al. (2012). "Developing intuition: Neural correlates of cognitive-skill learning in caudate nucleus". Journal of Neuroscience 28: 17492–17501.Go / Baduk / Weiqi361Up to 36111017010360Allis 1994 * 150

Components

The primary components of a computer shogi program are the opening book, the search algorithm and the endgame. The "opening book" helps put the program in a good position and saves time. Shogi professionals, however, do not always follow an opening sequence as in chess, but make different moves to create good formation of pieces. The "search algorithm" looks ahead more deeply in a sequence of moves and allows the program to better evaluate a move. The search is harder in shogi than in chess because of the larger number of possible moves. A program will stop searching when it reaches a stable position. The problem is many positions are unstable because of the drop move. Finally, the "endgame" starts when the king is attacked and ends when the game is won. In chess, there are fewer pieces which leads to perfect play by endgame databases; However, pieces can be dropped in shogi so there are no endgame databases. A tsumeshogi solver is used to quickly find mating moves.

Computers versus humans In the 1980s, due to the immaturity of the technology in such fields as programming, CPUs and memory, computer shogi programs took a long time to think, and often made moves for which there was no apparent justification. These programs had the level of an amateur of kyu rank.

In the first decade of the 21st century, computer shogi has taken large steps forward in software and hardware technology. In 2007, top shogi player Yoshiharu Habu estimated the strength of the 2006 world computer shogi champion Bonanza. He contributed to the newspaper Nihon Keizai Shimbun evening edition on 26 March 2007 about the match between Bonanza and then Ryūō Champion Akira Watanabe. Habu rated Bonanza's game at the level of 2 dan shogi apprentice (shōreikai).

In particular, computers are most suited to brute-force calculation, and far outperform humans at the task of finding ways of checkmating from a given position, which involves many fewer possibilities. By 2008, games against computers with time limits of 10 seconds from the first move had become a tough challenge even for professional players. In 1996 Habu predicted a computer would beat him in 2015. Akira Watanabe gave an interview to the newspaper Asahi Shimbun in 2012. He estimated the computer played at the 4 dan professional level. Watanabe also said the computer sometimes found moves for him.

On 23 October 2005, at the 3rd International Shogi Forum, the Japan Shogi Association permitted Toshiyuki Moriuchi, 2005 Meijin, to play computer shogi program YSS. Toshiyuki Moriuchi won the game playing 30 seconds per move with a Bishop handicap. In 2012, a retired professional lost a match with computer publicly first, and in 2013, active shogi professionals too.

Bonanza versus Watanabe (2007)

The Japan Shogi Association (JSA) gave reigning Ryuo Champion Watanabe permission to compete against the reigning World Computer Shogi Champion Bonanza on 21 March 2007. Daiwa Securities sponsored the match. Hoki Kunihito wrote Bonanza. The computer was an Intel Xeon 2.66 GHz 8 core with 8 gigabytes of memory and 160-gigabyte hard drive. The game was played with 2 hours each and 1 minute byo-yomi per move after that. Those conditions favor Watanabe because longer time limits mean there are fewer mistakes from time pressure. Longer playing time also means human players can make long-term plans beyond the computer's calculating horizon. The 2 players were not at the same playing level. Watanabe was the 2006 Ryuo Champion and he gave Bonanza a rating equivalent to first or third dan. Bonanza was a little stronger than before due to program improvements and a faster computer. Watanabe prepared for a weaker Bonanza as Watanabe studied old Bonanza game records.

Bonanza moved first and played Fourth File Rook Bear-in-the-hole as Watanabe expected. Watanabe thought some of Bonanza's moves were inferior. However, Watanabe deeply analyzed these moves thinking that maybe the computer saw something that Watanabe did not see. Watanabe commented after the game that he could have lost if Bonanza had played defensive moves before entering the endgame. But the computer choose to attack immediately instead of taking its time (and using its impressive endgame strategies) which cost it the match. Bonanza resigned after move 112.

After Bonanza's loss Watanabe commented on computers in his blog, "I thought they still had quite a way to go, but now we have to recognize that they've reached the point where they are getting to be a match for professionals." Watanabe further clarified his position on computers playing shogi in the Yomiuri Shimbun on 27 June 2008 when he said "I think I'll be able to defeat shogi software for the next 10 years". Another indication Bonanza was far below the level of professional Watanabe came 2 months after the match at the May 2007 World Computer Shogi Championship. Bonanza lost to the 2007 World Computer Shogi Champion YSS. Then YSS lost to amateur Yukio Kato in a 15-minute game.

Annual CSA tournament exhibition games (2003–2009) The winners of CSA tournaments played exhibition games with strong players. These exhibition games started in 2003. YearProgramHumanHandicapTimeByoyomiWinner 2003IS ShogiPro 5 Dan Katsumata2 Piece Handicap25 MinNoneComputer 2004YSSPro 5 Dan KatsumataRook25 MinNoneComputer 2005GekisashiPro 5 Dan KatsumataBishop25 MinNoneComputer 2006BonanzaYukio KatoNone15 Min30 SecHuman 2007YSSYukio KatoNone15 Min30 SecHuman 2008Tanase ShogiYukio KatoNone15 Min30 SecComputer 2008GekisashiToru ShimizugamiNone15 Min30 SecComputer 2009GPS ShogiAmateur championNone1 hour1 minCanceled In each succeeding year, the human competition was stronger to match the stronger programs. Yukio Kato was the Asahi Amateur Meijin champion. Toru Shimizugami was the Amateur Meijin champion. Eiki Ito, the creator of Bonkras, said in 2011, at present, top Shogi programs like Bonkras are currently at a level of lower- to middle-class professional players.

Akara versus Shimizu (2010)

The computer program Akara defeated the women's Osho champion Ichiyo Shimizu. Akara contained 4 computer engines: Gekisashi, GPS Shogi, Bonanza, and YSS. Akara ran on a network of 169 computers. The 4 engines voted on the best moves. Akara selects the move with the most votes. If there is a tie vote then Akara selects Gekisashi's move. Researchers at the University of Tokyo and the University of Electro-Communications developed Akara.

Shimizu moved first and resigned in 86 moves after 6 hours and 3 minutes. Shimizu said she was trying to play her best as if she was facing a human player. She played at the University of Tokyo on 11 October 2010. The allotted thinking time per player is 3 hours and 60 seconds byoyomi. 750 fans attended the event. This is the third time since 2005 that the Japan Shogi Association granted permission to a professional to play a computer, and the first victory against a female professional.

Akara aggressively pursued Shimizu from the start of the game. Akara played with a ranging rook strategy and offered an exchange of bishops. Shimizu made a questionable move partway though the game, and Akara went on to win. Ryuo champion, Akira Watanabe, criticized Shimizu's game. On 19 November 2010, the Daily Yomiuri quoted Watanabe. Watanabe said, "Ms. Shimizu had plenty of chances to win".

Computers Bonanza and Akara beat amateurs Kosaku and Shinoda (2011) On 24 July 2011, there was a two-game amateur versus computer match. Two computer shogi programs beat a team of two amateurs. One amateur, Mr. Kosaku, was a Shoreikai three Dan player. The other amateur, Mr. Shinoda, was the 1999 Amateur Ryuo. The allotted time for the amateurs was main time 1 hour and then 3 minutes per move. The allotted time for the computer was main time 25 minutes and then 10 seconds per move.

Game Computer Sente (first) Gote (second) Moves Computer Time Amateur Time Hardware Winner 1 Bonanza Kosaku & Shinoda Bonanza 93 24 min 41 sec 2 hours 2 min 17 processors, 132 cores, 300 GB Bonanza 2 Akara Akara Kosaku & Shinoda 150 25 min 54 sec 1 hour 42 min Intel Xeon W3680 with 6 cores Akara

Bonkras versus Yonenaga (2011–2012) On 21 December 2011, computer program Bonkras crushed retired 68-year-old Kunio Yonenaga, the 1993 Meijin. They played 85 moves in 1 hour, 3 minutes 39 seconds on Shogi Club 24. Each player started with 15 minute time limit and an additional 60 seconds are added to each player's time limit per move. Yonenaga was gote (white) and played 2. K-62. This move was to confuse the computer by playing a move not in Bonkras's joseki (opening book). On 14 January 2012, Bonkras again defeated Yonenaga. This match is the first Denou-sen match. The game had 113 moves. Time allowed was 3 hours and then 1 minute per move. Bonkras moved first and used a ranging rook opening. Yonenaga made the same second move, K-6b, as in the previous game he lost. Bonkras ran on a Fujitsu Primergy BX400 with 6 blade servers to search 18,000,000 moves per second. Yonenaga used 2 hours 33 minutes. Bonkras used 1 hour 55 minutes. Bonkras evaluated its game with Yonenaga in January 2012.

Denou-sen (2013)

Denou-sen was a shogi competition where humans faced off against machines. The second Denou-sen match was a five-game match sponsored by Niconico in which five professional shogi players played against five computers. The winners of the previous World Computer Shogi Championship played against professional shogi players. The primary time control was of 4 hours, and the secondary time control was 1 move in 60 seconds. Niconico broadcast the games live with commentary. +Shogi professionals NameDanJun'isen classAgeJSA number Kōru Abe 4C218283 Shin'ichi Satō 4C231271 Kōhei Funae 5C126281 Yasuaki Tsukada 9C148148 Hiroyuki Miura 8A39204

+ProgramsProgramProgrammersHardwarePositions/secondMoves deepProgrammer's First TournamentShuesoAkira Takeuchi2 CPUs/8 cores10,000,00018~2008PonanzaIssei Yamamoto10 CPUs30,000,00030~2009TsutsukanaTakanori Ichimaru1 CPU 2010Puella alphaEikyu Ito3 CPUs/16 cores4,000,00020~1999GPS ShogiTanaka Tetsuro, GPS team 667 CPUs280,000,000222001