Browse by section

Game 日本語

Gunjin Shogi (Japanese Military Chess): Free, and No Referee

Gunjin Shogi (軍人将棋), or Japanese military chess, is a hidden-rank board game you can play free in a browser, with no referee. The traditional game takes three people — two players and a referee — because the pieces lie face down and someone has to judge a fight without telling either side what the other piece was. Here the screen takes that third seat and a CPU plays the opposing army, so one person is enough. The board is 6 columns by 7 rows, each side has 12 pieces, and a game runs five to eight minutes. No account, no install, nothing to buy — open Gunjin Shogi, a free browser game against a CPU with no referee and you can set up an army straight away. This article is written by the person who built it, so it covers every piece and its rank, and the 720 self-play games used to check the three formations against each other.

Sponsored

What Is Gunjin Shogi (Japanese Military Chess)?

Gunjin Shogi (軍人将棋) is a board game in which both armies move face down, and when two pieces meet on the same square the higher rank wins. It has been sold in Japan since at least 1895 and is also known as Marching Chess (行軍将棋, Kōgun Shōgi). Because you never see what an enemy piece is, the game is about deducing it from how it moves and from what happens when it fights.

The board in this version is 6 columns by 7 rows, 42 squares in total, with 12 pieces per side. The two rows nearest you are your camp, the two far rows are the opponent’s camp, and the three rows between them are the battlefield. A camp is exactly 12 squares, so every square of it is occupied at the start. You win by taking the opponent’s flag (軍旗, gunki) or by removing every piece they can still move. It is a draw when neither side can move, and also when the two sides have played 120 moves between them.

One thing worth knowing if you compare this against a boxed set in Japan: the commercial versions are larger. The English Wikipedia article on Gunjin Shōgi describes a 23-piece version on a 6×4 home area, made up of a flag, 12 officers, two planes, two tanks, a cavalry unit, two engineers, a spy and two land mines. This browser version trims that to 9 piece types and 12 pieces per side, so the Lieutenant Colonel, Major, Captain, Lieutenant, tank, plane and cavalry do not appear at all. The cut is what keeps a game inside five to eight minutes.

On screen your own pieces are red-tinted cut-leather figures and the opponent’s are black shadows thrown on a sheet of white cloth. All 12 shadows have the same outline and the same size, and nothing about a shadow changes with rank. The look borrows from Southeast Asian shadow theatre — leather figures held up to a lamp — and is not tied to any real troupe, repertoire or myth.

The Gunjin Shogi board mid-game, with the opponent's black shadows along the far rows and red cut-leather pieces in front

  • Price: free, with no account, no login and no install
  • Players: solo against a CPU, at one of three strength settings
  • Length: five to eight minutes per game
  • Runs on: mobile browsers on iPhone and Android, and desktop browsers
  • Interface language: Japanese. Every piece is named in kanji — the reading table is the third section of this article

Why Does Gunjin Shogi Need a Referee? The Problem a Solo Version Has to Solve

Traditional gunjin shogi needs three people at the table: two players and a referee. The pieces lie face down on the board, so when two of them meet, the players cannot settle the fight between themselves without showing each other exactly the information the game is built on hiding. Only the referee looks at both pieces, and the referee announces which one stays on the board and nothing more. Wikipedia puts the same rule in one line: “A third-party observer usually is used to judge the results from the attack.”

In this version the screen takes the third seat. Step into a square holding an enemy shadow and both pieces are pressed against the cloth, their identities surface for a moment, and the higher rank remains. Nobody has to announce anything. Wikipedia notes the same thing about the genre as a whole: “Gunjin Shōgi is well-suited for video game implementation since the computer can take the place of the third-party arbiter without revealing the identity of pieces.” With a CPU playing the other army, the head count drops from three to one.

Not every hidden-rank board game has this problem. In Luzhanqi (陆战棋, Chinese land battle chess) the pieces stand upright with the rank printed on the side facing their owner, so each player can read their own army and the two of them can compare ranks themselves; Wikipedia lists it as a game for two, “3 with a referee”. Gunjin shogi lays its pieces flat and face down, which is what makes the third seat compulsory rather than optional. The first problem this version had to solve was not building a strong CPU. It was getting rid of that third person.

English search in September 2026 for “gunjin shogi rules” and “japanese military chess online” returned the Wikipedia article, a BoardGameGeek entry, a Japanese-language Android app and a long tail of ordinary shogi pages. I did not find a page where you open a browser and play gunjin shogi itself, which is the gap this version is aimed at. If a game needs three people to start, and one of those three does nothing but watch, the version worth building is the one that removes the seat.

Sponsored

Every Piece, Rank and Move: The Reading Table

The ranks in this gunjin shogi are General 5, Lieutenant General 4, Major General 3 and Colonel 2, while the Second Lieutenant, the Spy and the Engineer are all rank 1. The higher number stays on the square, and equal numbers destroy each other. The Flag and the Mine are never compared by rank at all.

Every piece is labelled in kanji on screen, and there is no English toggle, so the table below gives the kanji, its reading and the English rank alongside the numbers. It doubles as the glossary for the board: what you see on a revealed enemy piece is the string in the first column.

On the piece Romaji English name Rank Count Move Special
軍旗 gunki Flag — 1 cannot move lose it and you lose the game
大将 taishō General 5 1 one square up, down, left or right loses only to the Spy
中将 chūjō Lieutenant General 4 1 one square up, down, left or right —
少将 shōshō Major General 3 1 to 3 one square up, down, left or right —
大佐 taisa Colonel 2 2 to 5 one square up, down, left or right —
少尉 shōi Second Lieutenant 1 0 to 2 one square up, down, left or right —
スパイ supai Spy 1 1 one square up, down, left or right beats the General, and only the General
地雷 jirai Mine — 1 cannot move beats any piece that attacks it, except the Engineer
工兵 kōhei Engineer 1 1 any number of empty squares in a straight line clears the Mine

Three results are not decided by the rank number. The Spy beats the General, and it makes no difference which of the two attacks. The Mine beats every piece that attacks it. The Engineer is the only piece that can clear a Mine, so when the Engineer is the attacker, the Engineer wins. General loses to Spy, everything loses to Mine, Mine loses to Engineer: the three exceptions close into a loop.

The counts have ranges because they change with the formation you pick. The Flag, General, Lieutenant General, Spy, Mine and Engineer are one each in every formation; only the Major General, the Colonel and the Second Lieutenant vary. The 9 piece types are the whole list — nothing else exists in this version.

The three rank-1 pieces share a number but not a value. Inside the CPU they carry separate weights: Engineer 44, Spy 34, Second Lieutenant 13, which puts the Engineer above the rank-3 Major General at 38. The Engineer is the only piece that can clear a Mine, and the Spy can erase the General on its own. That leaves the Second Lieutenant as the one rank-1 piece you can afford to throw away, and it is the Second Lieutenant or a Colonel you send in first when you want to find out what an enemy shadow is.

The Engineer’s movement carries one restriction added for this version. The Engineer runs any distance in a straight line, but it may only start a fight against a square directly next to it. Letting it strike a distant piece where it stands would mean a still-hidden Engineer could take the Flag from the far edge of the board in a single move, with nothing the defender could do about it. Closing the distance and striking are deliberately two separate turns.

When Is a Piece Revealed? Only Two Ways

An enemy piece in gunjin shogi becomes known in exactly two situations: when it fights, and when it moves two or more squares in a straight line. Only the Engineer can do the second, so a shadow that runs is an Engineer for certain. For every other shadow, the only signal is whether it has moved at all — and a shadow that has moved is, by elimination, neither the Flag nor the Mine.

Holding all of that in your head is the worst part of playing gunjin shogi with physical pieces, so I measured how much there is to hold. Over 300 CPU-versus-CPU games at the “normal” setting, a game ran 53.9 plies on average and 7.77 of the opponent’s 12 pieces had been identified by the end. More than half the enemy army, each piece with a memory of when and how it was found out.

This version therefore leaves a name tag on the board next to any enemy piece a fight has revealed, so there is nothing to write down. You can also long-press an enemy shadow and record your own reading of it, as in “probably the General”. The mark has three levels — unknown, guess and certain — and selecting the same piece again toggles between guess and certain. Marks last for that game. It is there so the game is a deduction contest and not a memory test, which is the same reasoning behind Salvage Bell, a simultaneous bidding game with all nine prizes visible up front, where every weight already spent stays face up and the only hidden thing is the bid being made right now.

One danger is easy to miss, so the screen flags it. Whenever a straight, unobstructed line runs to your own Flag, a red ring appears around the Flag. An enemy Engineer that enters that line reaches the square next to your Flag in one move, however far away it starts. When the ring shows, you either block the line or deal with the shadows standing on it first.

For a sense of how different this is from a game of full information, this site also has Ultimate Tic Tac Toe rules and how to actually win, where every piece is visible and the difficulty is reading a board you can see completely. Gunjin shogi is the other case: the board is plain and the pieces on it are not.

A revealed enemy piece carrying a Major General name tag, with guess marks for General and Mine on two other shadows

Sponsored

What Do the Three Formations Change? Only the Major General, the Colonel and the Second Lieutenant

Before each game you choose one of three formations for your 12 pieces: Assault (突撃, totsugeki), Defence (守備, shubi) or Disruption (かく乱, kakuran). The Flag, Spy, Mine, Engineer, General and Lieutenant General are one each in all three, so the only counts that actually change are the Major General, the Colonel and the Second Lieutenant. The three formations are three ways of dealing out the remaining 8 pieces.

Formation The other 8 pieces Character
Assault (突撃) General 1, Lieutenant General 1, Major General 3, Colonel 2, Second Lieutenant 1 Three Major Generals. Meet things head-on and push through
Defence (守備) General 1, Lieutenant General 1, Major General 1, Colonel 5 Five Colonels. Block the lanes with numbers
Disruption (かく乱) General 1, Lieutenant General 1, Major General 2, Colonel 2, Second Lieutenant 2 Four rank-1 pieces. Fighting it tells the opponent little

The “four rank-1 pieces” in Disruption are two Second Lieutenants plus the Spy and the Engineer. When one of them attacks, the defender learns that a rank-1 piece was involved and cannot tell which of the three it was. The formations differ in how much information a fight hands to the opponent, not in the total strength of the army. You choose only your own formation; the CPU’s is drawn at random from the same three each game and stays hidden until the result screen. Working out which one you are facing, from the ranks that keep turning up, is part of the deduction.

Are the Three Formations Balanced? 720 Self-Play Games

The three formations were checked against each other by self-play rather than by judgement. A full round robin of 720 games put their average win rates at 49.2%, 49.0% and 51.7%. Rerunning the same 720 games with a different random seed for this article gave Assault 50.4%, Defence 47.8% and Disruption 51.8%, counting a draw as half a win. No formation left the band either time.

The turn order was measured the same way. Across 300 games between two “normal” CPUs, the player moving first won 51.2% — 153 wins, 146 losses and 1 draw. Where the first-move advantage is large it has to be paid for in points, which is what fixing the mancala first player advantage with a 3-seed komi does, borrowing the komi idea from Go and putting seeds in the second player’s store before the first move. In gunjin shogi the edge is small enough that first or second is offered as a preference, not a handicap. Counting how those same 300 games ended: 270 by capturing the Flag, 29 by wiping out every piece the loser could still move, and 1 draw at the 120-move limit. Roughly nine games in ten are decided at the Flag.

The placement rules gained a clause after testing too. Automatic placement always puts a piece of rank 2 or higher directly in front of the Flag, and never puts the Mine there — the Mine goes diagonally in front of the Flag or beside it. With a Mine or a Second Lieutenant in front of the Flag, an enemy Engineer runs straight in, clears the Mine and walks through to the Flag; before this clause was added, games finishing in 8 moves showed up in testing. The same advice holds when you place the 12 pieces by hand: keep a Colonel or better directly in front of the Flag.

What Separates the Three CPU Levels? Sampling Five Possible Boards

The CPU settings — easy (やさしい), normal (ふつう) and hard (つよい) — differ in how far they go in deducing the identity of your pieces, not in how deep they search. Search depth alone makes a poor difficulty dial in a game where most of the opposing army is face down.

  • Easy: does not reason about your hidden pieces at all and plays on piece placement alone. On top of that it deliberately plays a non-optimal move one time in four (25%)
  • Normal: works out a probability distribution over what each hidden piece is, from whether it has moved and from every fight so far, and plays the best one-move expected value
  • Hard: samples five complete boards from that distribution, treating each as “suppose it were really this”, searches three moves deep in each, and takes the majority verdict

The gap between the levels was measured over 20,000 games at each pairing. With the formation and the placement drawn fresh every game, hard beats normal 71% of the time and normal beats easy 79% (first move split evenly; 31 and 99 draws respectively). Hard rebuilds its five sample boards on every single turn. The random seed is redrawn each game, so an identical starting placement does not produce an identical sequence of moves, and there is no memorised line that wins.

The daily puzzle, Today’s Puzzle (今日の一問), which rotates at midnight Japan time, is generated by the same engine. Every enemy piece is face up, and you have to take the enemy Flag within a set number of moves; the target alternates between 3, 4 and 5 moves by day. The defence plays its best escape, so any detour runs out of moves. Two conditions have to hold: the position must not be solvable in fewer moves than advertised, and exactly one first move must work.

Those conditions turn out to be strict, and I counted how strict. Of 4,000 candidate positions generated for 20 days, 236 (5.9%) were usable. Of the rest, 2,001 were discarded early on a distance-to-Flag estimate, 1,349 solved in a different number of moves than the one being targeted, and 414 had two or more correct first moves. The puzzle for 3 November 2026, the day this article goes up, is a five-move problem, and it was the 26th candidate tried that day. Deciding a daily puzzle by counting rather than by feel is the same method used in 7 advanced sudoku techniques after X-Wing, ranked by real use, where the ranking comes from running the solver over thousands of grids.

Today’s Puzzle is the same position for everyone. The board is built from a seed derived from the date, so two people on different devices on the same day get the same problem. Clearing it adds to a streak counter, and you can post how many moves you needed to X — the solution itself is not shared. Because nothing is hidden at the start, it asks a different question from a normal game: no deduction, only calculation.

The Rest of the Interface Is in Japanese: Menus and Buttons

The interface of this gunjin shogi is Japanese only, with no English toggle. The piece names are covered by the reading table earlier in this article; what is left is the menus, and there are not many. Each decision sits in a fixed place on screen, so the table below is enough to get from the title screen to the end of a game.

On screen Romaji What it does
対局をはじめる taikyoku o hajimeru Start a game against the CPU
今日の一問 kyō no ichimon Today’s Puzzle, the daily take-the-Flag problem
ルールと遊び方 rūru to asobikata Rules and how to play (in Japanese)
はじめての方へ hajimete no kata e Tutorial: four moves on a real board
やさしい / ふつう / つよい yasashii / futsū / tsuyoi CPU strength: easy / normal / hard
先手 / 後手 sente / gote You move first / the CPU moves first
突撃 / 守備 / かく乱 totsugeki / shubi / kakuran The three formations: Assault / Defence / Disruption
駒を並べる koma o naraberu Go to the placement screen
おまかせ omakase Place all 12 pieces automatically
対局開始 taikyoku kaishi Begin the game with this placement
あなたの番 anata no ban Your turn
推理メモ suiri memo Deduction notes: what is left on both sides
待った matta Undo your move and the CPU’s reply, as a pair
この影は何か kono kage wa nani ka “What is this shadow?” — the guess-mark sheet, opened by long-pressing an enemy piece
推測 / 確定 suisoku / kakutei Guess / certain, the two marked levels; no mark means unknown
消す(印を外す) kesu Remove the mark from that piece
不明 / 判明 / 消えた fumei / hanmei / kieta Unknown / identified / gone, in the enemy piece count
もう一局 mō ikkyoku Play another game
タイトルへ taitoru e Back to the title screen

How to Play Gunjin Shogi: Price, Saves and Where It Runs

Gunjin Shogi is free, with no account and no installation. Your record — wins, losses, draws and the Today’s Puzzle streak — is stored in the browser you played in. Nothing is sent to a server, so the record does not follow you to another device.

  • Where to play: Gunjin Shogi, a free hidden-rank board game against a CPU
  • How to move: tap one of your own pieces to select it, then tap the destination square. Long-press an enemy shadow to put a guess mark on it
  • Undo: one button rolls back your move together with the CPU’s reply, with no limit on how often
  • First time: a tutorial walks four moves on the real board
  • Full rules: the app page carries a Japanese rules-and-how-to-play section under the game
  • Other games on this site: the rinblog app and game index

Every win rate and move count in this article comes from CPU-versus-CPU self-play. A person who works on their placement, or who reads a particular opponent’s habits, will not necessarily reproduce the same balance. If a formation feels lopsided in real play, or the CPU feels too weak or too strong at a given setting, that is the material the next adjustment gets made from.