Janggi (Korean Chess)

Janggi is Korean chess. Trap the other general so it cannot escape and you win. Play the computer at three levels, or take turns on one device. Tap a piece to see where it can go. The piece sounds are recordings of real wooden pieces.

Updated How it works

Play janggi

Choose an opponent and a setup, then tap Start. Cho (the blue pieces) moves first. A game in progress is saved on this device, so you can leave and pick it up later.

Opponent
Your side
You play the blue Cho pieces and move first

The order of the horses (H) and elephants (E) in your back row. The picture below shows your back row as you see it.

Your setup

The computer's setup is picked at random when the game starts.

Games finished today
0
Wins vs computer
Easy 0 · Medium 0 · Hard 0

How to use

  1. On the first screen, choose your opponent (computer Easy, Medium or Hard, or two players on one device). Against the computer, also choose your side: First (Cho), Second (Han) or Random.
  2. Choose a setup from the pictures. A setup is the order of the horses and elephants in the back row, and there are four. Against the computer you choose only your own setup, and the computer’s setup is picked at random when the game starts. With two players, Cho and Han each choose theirs. Tap Start and Cho moves first.
  3. Tap one of your pieces and dots appear on the points it can move to. Points where you can capture an opposing piece get a round outline. Tap a marked point and the piece slides there. You can also drag a piece and drop it.
  4. While the computer is thinking, “Computer is thinking” is shown and the board cannot be tapped. The screen does not freeze.
  5. The last two points played are highlighted in yellow. When a general is in check, it gets a red outline and a “Janggun!” band appears at the top. On the move after you get out of check, a “Mungun!” band appears briefly.
  6. Pass, below the board, hands the turn over when you have nowhere to go or want to rest. You cannot pass while in check, and the button is disabled then.
  7. Undo has no limit. Against the computer it takes back your move and the computer’s reply together, and with two players it takes back one move at a time. Resign ends the game as a loss.

A game in progress is saved on this device after every move, so you can close the page and pick it up later. Tapping Quit deletes the saved game. With a keyboard, use the arrow keys to move between points and Enter or Space to select. A screen reader reads the position and the piece, such as “row 3, column 5, Cho Chariot” (rows are counted from the top, columns from the left), and announces each move once it is played.

Rules: pieces, the palace, bikjang and passing

SettingDetails
Board9 x 10 points, with a palace that has diagonal lines on each side. Cho (blue) moves first
WinThe other general is in check and cannot escape (checkmate). If a side resigns, the other side wins
DrawBikjang not resolved, the same position three times, or neither side has a piece that can attack
Computer EasyLooks one move ahead and sometimes plays at random (within 1 second per move)
Computer MediumLooks three moves ahead and rarely makes big mistakes (within 1 second per move)
Computer HardLooks deeper (within 3 seconds per move)
PassAny time you are not in check. Not allowed while in check
UndoNo limit. Two moves at a time against the computer, one move at a time with two players

How the pieces move. In janggi, pieces stand on the points where lines cross, not inside squares. On the screen the pieces show a letter: G general, A advisor, E elephant, H horse, R chariot, C cannon and S soldier.

  • General (G) lives in the palace, the 3 by 3 area with diagonal lines on each side. It moves one point along a palace line, straight or diagonal, and cannot leave the palace.
  • Advisor (A) also stays in the palace and moves one point along a palace line, the same way as the general.
  • Chariot (R) moves any number of points in a straight line and captures the first enemy piece in its way. Inside a palace it can also follow the diagonal lines.
  • Cannon (C) must jump over exactly one piece, of either side, to move or capture. It cannot jump over another cannon and cannot capture one. It can also use the palace diagonals in the same way.
  • Horse (H) moves one point straight and then one point diagonally outward. If a piece stands on the first point, the horse is blocked and cannot make that move.
  • Elephant (E) moves one point straight and then two points diagonally outward. If a piece stands on either of the points it passes, it is blocked.
  • Soldier (S) moves one point forward or sideways, never backward. Inside the enemy palace it can also move one point diagonally forward along a palace line.

Check and checkmate. Check, called janggun in Korean, means a general is on a point where it could be captured. You must deal with it on your next move, and answering it is called mungun. If you cannot, it is checkmate and you lose. Checkmate is the only way to win. There is no move limit and no counting of points.

Bikjang. The two generals may not face each other along the same line with nothing between them. When that happens, a “Bikjang!” band appears. If it is not resolved on the next move, the game is a draw.

Pass. When you are not in check you may pass your turn, which is called hansuswim in Korean. Even if both sides keep passing, the game is a draw once the same position has come up three times. The computer does not pass at random. It passes only when every other move is worse.

Setups. Each side places its horses and elephants in the back row in one of four orders: H-E-H-E, E-H-E-H, H-E-E-H or E-H-H-E (H is a horse and E is an elephant). Everything else is the same in all four.

The piece sounds are not synthesized. They are recordings of real wooden pieces being set down on a wooden board. Sound is off at first. Tap “Sound on” to hear it. Moves, captures and check each have their own sound.

Example: a checkmate with one chariot

Here is one game of “Two players, one device” in which Cho builds a checkmate with a chariot. Positions are given as row and column, with rows counted from the top and columns from the left. Both sides use the H-E-E-H setup.

  1. Cho moves the general from row 9, column 5 to row 8, column 4. Han moves a horse from row 1, column 8 to row 3, column 7.
  2. A Cho soldier moves from row 7, column 3 to row 7, column 2. A Han soldier moves from row 4, column 5 to row 5, column 5.
  3. A Cho soldier moves from row 7, column 9 to row 7, column 8. A Han soldier moves from row 4, column 9 to row 4, column 8.
  4. The Cho chariot goes from row 10, column 9 up to row 1, column 9, capturing a Han chariot. A Han soldier moves to row 5, column 6.
  5. The Cho chariot moves to row 1, column 7 and captures a Han elephant. The Han general steps aside to row 2, column 6.
  6. The Cho chariot captures a Han horse at row 3, column 7. A Han cannon moves to row 3, column 6.
  7. The Cho chariot moves up to row 2, column 7 and gives check. The Han general has nowhere to go and nothing can block, so “Checkmate!” appears and Cho wins.

Edge cases: saving, two players and small screens

  • What stays on this device is your sound setting, text size, the opponent, side and setup you chose last, the move list of a game in progress, the number of games you finished today, and the number of wins at each computer level. None of it is sent to a server, and it disappears if you clear the site data.
  • With two players on one device the board is not flipped, and Cho (blue) is always at the bottom. Only when you play Han (red) against the computer is the board turned so that your pieces are at the bottom.
  • Even if you keep passing, the game is a draw once the same position has come up three times. The computer does not pass at random.
  • On a phone the board uses the full screen width. On a large screen it grows up to 560 px wide.
  • If your device is set to reduce motion, pieces no longer slide or fade, and only the markings change.
  • If you hear no sound, check whether the sound button is off. Sound starts after you have tapped the page once, and a device on silent will not play it even when the button is on.

Frequently asked questions

Which rules does it use?

The usual janggi rules. There is no move limit and no judging by points, so you can only win by checkmate. A game is a draw when bikjang is not resolved, when the same position comes up three times, or when neither side has a piece that can attack. There is no clock or time limit.

How strong is the computer?

Easy can be beaten by someone playing for the first time. Medium makes fewer mistakes that lose a piece in one move. Hard looks deeper and is not easy to beat. Every level thinks for at most 1 to 3 seconds per move.

Is my game saved?

Yes, but only on this device. It is saved after every move, and it is deleted when the game ends or when you tap Quit. Nothing is sent to a server, and there is no login.

What does the site count in its visit statistics?

Only the game name and the opponent (computer Easy, Medium, Hard, or two players) when a game starts, when a game ends, and when you tap Play again. It does not send which moves you played, who won or how long the game took.

What do the sounds come from?

They are recordings of wooden pieces being set down on a wooden board. Each time, a recording different from the last one is picked, so the sound varies slightly. The sound files are downloaded only after you turn sound on. The recordings were published as CC0 (public domain) on Freesound by taure and Raclure. They are recordings of wooden board game pieces, not of janggi pieces.

How it works

The board is a grid of 90 points, 9 lines across and 10 lines down, and Cho (the blue pieces) moves first. The moves and captures of the general, advisor, elephant, horse, chariot, cannon and soldier follow the rules of janggi, and a move that leaves your own general in check cannot be played. If a general is in check and cannot escape, that is checkmate and the checkmated side loses. Bikjang, where the two generals face each other with no piece between them, is a draw if the opponent does not resolve it on the next move. The game is also a draw when the same position comes up three times, and when neither side has a piece that can attack (chariot, cannon, horse, elephant or soldier). There is no move limit and no win or loss by points. When you are not in check you may pass your turn. The computer opponent is calculated by this site's own code, no moves are sent to an outside service, and everything is calculated in your browser. Easy looks one move ahead and sometimes plays at random, Medium looks three moves ahead, and Hard looks deeper. The computer thinks for at most 1 second per move at Easy and Medium and 3 seconds at Hard. The tests for the rules and the computer are in this site's repository.

Last checked

Found a calculation mistake? Let us know.