오별랩 OByeolLab

전통놀이

장기 한판

Korean chess against the computer.컴퓨터와 장기를 둬요. 장군·멍군·외통.

게임 화면은 한국어예요.

게임 시작

새 창에서 열기 다른 게임

장기 한판

장기 한판은 한국의 전통 보드게임 장기를 컴퓨터와 두는 게임이에요. 초(楚)와 한(漢) 두 진영이 서로의 궁을 몰아붙이고, 장군을 막지 못하게 만드는 외통으로 이겨요.

조작법

  • 말을 누르면 갈 수 있는 곳에 점이 찍혀요. 점을 누르거나 말을 끌어서 옮겨요.
  • 키보드는 방향키로 자리를 옮기고 Enter로 말을 고르거나 옮겨요. Esc는 선택을 취소해요.
  • 시작 전에 내 진영(초가 먼저), 내 마상 배치, 상대 배치, 난이도(쉬움, 보통, 어려움)를 골라요.
  • 둔 수는 옆의 기보 칸에 차례로 적혀요. 기권은 버튼을 두 번 눌러야 해요.
  • 무르기와 기권 버튼이 있고, 두 궁이 마주 보면 빅장으로 비기기 버튼이 나타나요.

규칙과 점수

  • 초가 먼저 둬요. 장군을 받으면 꼭 막아야 하고, 못 막으면 외통으로 져요.
  • 무르기는 세 번까지 돼요. 둘 수 있는 수가 없으면 져요.
  • 두 궁이 마주 보면 빅장으로 비길 수 있고, 같은 판이 세 번 나와도 비겨요.
  • 200수가 지나면 남은 말 점수로 정해요. 차 13, 포 7, 마 5, 상 3, 사 3, 졸과 병 2점이고, 한은 덤 1.5점을 더해요.

팁: 포는 말 하나를 넘어서 가지만, 포끼리는 넘지도 잡지도 못해요. 처음엔 이 점만 기억해도 좋아요.

장군, 멍군, 외통: 장기판의 말

장기를 두며 쓰는 말을 모았어요. 뜻은 표준국어대사전의 풀이를 따랐어요.

  • 장군(將軍): 상대 궁을 잡으려고 놓는 수예요. 두는 사람이 '장군!' 하고 소리 내어 알리기도 해요.
  • 멍군: 장군을 받아 막는 수예요.
  • 외통(外通): 장군을 받은 궁이 피할 곳이 없는 상태예요. 외통이 되면 져요.
  • 빅장: 두 궁 사이에 다른 말 없이 마주 선 상태(대궁)에서 불러 비기게 되는 장군이에요.
  • 훈수(訓手): 구경하던 사람이 끼어들어 수를 가르쳐 주는 일이에요.

느티나무 그늘과 사랑방의 놀이

장기는 옛 글에서 '상희(象戲)'라고 불렸고, 조선 중기 이후 문헌에 '장기'라는 말이 보여요. 한국민족문화대백과사전은 한국 장기의 역사를 고려 초까지 거슬러 올라가 봐요.

판은 가로 10줄, 세로 9줄이고, 말은 한쪽에 16개씩 모두 32개예요. 마을 어귀 느티나무 그늘, 사랑방, 정자, 가게 앞 어디서나 판을 벌였어요. 구경꾼의 훈수 때문에 다툼이 벌어져 웃음거리가 되기도 했대요.

말 글씨는 붉은색과 푸른색으로 나뉘어요. 실력이 나은 사람이 붉은 말을, 덜한 사람이 푸른 말을 잡는 것이 관례였다고 해요. 이 게임에서는 초 글씨가 초록, 한 글씨가 빨강이에요.

대회 규칙과 다른 점

사단법인 대한장기연맹 규칙에서는 초가 먼저 두고, 나중에 두는 한이 덤 1.5점을 받아요. 말 점수는 차 13, 포 7, 마 5, 상과 사 3, 병과 졸 2점으로 한쪽 합이 72점이에요. 이 게임의 점수와 덤도 같아요. 다른 점은 이래요.

  • 빅장: 연맹 규칙은 말을 하나라도 잡은 뒤에야 빅장을 부를 수 있고, 빅이 되면 남은 말 점수로 승패를 가려요. 이 게임은 두 궁이 마주 보면 언제든 빅장으로 비길 수 있어요. 사전 풀이처럼 비기는 쪽을 따랐어요.
  • 같은 모양 되풀이: 연맹 규칙은 세 번까지 허용하고 네 번째면 실격패예요. 이 게임은 같은 판이 세 번 나오면 비겨요.
  • 무르기: 연맹 규칙은 둔 수를 물려 주지 않아요. 이 게임은 세 번까지, 한 번에 두 수씩 무를 수 있어요.
  • 끝내기: 연맹 대회는 시간이 다 되면 남은 점수로 정해요. 이 게임은 시간 제한 대신 200수가 지나거나 양쪽 모두 공격할 말이 없으면 점수로 정해요.
  • 장군 부르기: 연맹 규칙은 장군을 말로 부르지 않아도 된다고 정해 두었어요. 이 게임은 화면에 '장군!'과 '멍군!'을 띄워 알려 줘요.

만든 이야기

컴퓨터는 양쪽이 가장 좋은 수를 둔다고 보고 몇 수 앞을 계산하는 알파-베타 탐색을 써요. 말 가치는 차 1300, 포 700, 마 500, 상과 사 300, 졸과 병 200으로 두고, 자리마다 작은 가산점을 더해요. 판에 말이 줄면 포가 넘을 말이 모자라니 포 가치를 조금씩 낮춰요.

쉬움은 0.16초 동안 한 수 앞만 보고 평가에 큰 무작위 값을 섞으며, 12% 확률로 아무 수나 둬요. 보통은 0.32초 동안 세 수 앞까지 보고 작은 무작위 값을 섞어요. 어려움은 0.5초 안에서 볼 수 있는 만큼 깊이 보고 무작위 값이 없어요. 장군이 걸린 장면은 한 수 더 깊이 봐요.

두 궁이 마주 봤는데 형세가 확실히 나쁘다고 판단하면 컴퓨터가 먼저 빅장을 불러 비겨요. 마상 배치는 네 가지 가운데 고를 수 있고, 컴퓨터 배치는 무작위로 정할 수도 있어요.

Korean chess against the computer

Janggi Hanpan lets you play janggi, the traditional Korean chess, against the computer. Two sides, Cho and Han, press in on each other's palace general, and you win by checkmate when the check cannot be stopped.

How to play

  • Tap a piece and dots show where it can go. Tap a dot, or drag the piece, to move.
  • On a keyboard, move with the arrow keys and press Enter to pick or place a piece. Esc cancels the selection.
  • Before the game, choose your side (Cho moves first), your horse and elephant setup, the computer's setup and its level: easy, normal or hard.
  • Moves are listed in the record panel beside the board. Resigning takes two presses of the button.
  • There are undo and resign buttons, and a button to draw by bikjang (generals facing each other) appears when the two palaces face each other.

Rules and scoring

  • Cho moves first. If you are in check you must stop it, and if you cannot, you lose by checkmate.
  • You can undo up to three times. A side with no legal move loses.
  • When the two generals face each other you may call a draw by bikjang, and a position that appears three times is also a draw.
  • After 200 moves, the remaining pieces are counted: chariot 13, cannon 7, horse 5, elephant 3, guard 3, soldier 2. Han adds 1.5 points as compensation.

Tip: A cannon jumps over exactly one piece, but cannons can neither jump nor capture other cannons.

Janggun, meonggun, oetong: words from the board

Here are words you hear over a janggi board. The meanings follow the Standard Korean Language Dictionary.

  • Janggun (將軍): a move that threatens the opponent's general, like check in chess. Players may call it out loud: "Janggun!"
  • Meonggun: a move that blocks a janggun.
  • Oetong (外通): the general is in check and has nowhere to go, like checkmate. It loses the game.
  • Bikjang: a janggun called when the two generals face each other with nothing between them (daegung), which ends the game in a draw.
  • Hunsu (訓手): a spectator leaning in to tell a player what to play.

A game for village trees and guest rooms

Old texts call the game sanghui (象戲), and the word janggi appears from the mid-Joseon period. The Encyclopedia of Korean Culture traces janggi in Korea back to the early Goryeo period.

The board has 10 lines one way and 9 the other, and each side has 16 pieces, 32 in all. People played anywhere: under the zelkova tree at the village entrance, in a sarangbang (guest room), in a pavilion or outside a shop. The encyclopedia notes that spectators' hunsu sometimes started arguments that ended in laughter.

The pieces are written in red or blue. The custom was for the stronger player to take red and the weaker one blue. In our game, Cho pieces are green and Han pieces are red.

Tournament rules and our game

Under the rules of Daehan Janggi Yeonmaeng (대한장기연맹), a Korean janggi federation, Cho moves first and Han, moving second, gets 1.5 points of compensation (deom). Pieces are worth chariot 13, cannon 7, horse 5, elephant and guard 3, soldier 2, for 72 points a side. Our game uses the same points and compensation. Here is what differs.

  • Bikjang: the federation allows it only after at least one piece has been captured, and the remaining points then decide the winner. In our game you can call bikjang any time the generals face each other, and it is a draw, as in the dictionary meaning.
  • Repetition: the federation allows the same position three times, and a fourth time loses by disqualification. In our game the third time is a draw.
  • Undo: the federation does not allow taking back moves. Our game lets you undo up to three times, two moves each time.
  • Ending: federation games are decided by remaining points when time runs out. Our game has no clock. It counts points after 200 moves, or when neither side has an attacking piece left.
  • Calling check: the federation rules say you do not have to say janggun out loud. Our game shows "Janggun!" and "Meonggun!" on screen.

Behind the game

The computer uses alpha-beta search: it looks a few moves ahead, assuming both sides play their best. Pieces are valued at chariot 1300, cannon 700, horse 500, elephant and guard 300, soldier 200, plus small bonuses for good squares. As the board empties, cannons have fewer pieces to jump over, so their value slowly drops.

Easy looks one move ahead for 0.16 seconds, mixes a lot of randomness into its scores and plays a random legal move 12% of the time. Normal looks up to three moves ahead in 0.32 seconds with a little randomness. Hard looks as deep as it can in 0.5 seconds with no randomness. Positions with a check are searched one move deeper.

When the generals face each other and the computer judges its position clearly bad, it calls bikjang itself. You can pick one of four horse and elephant setups, and the computer's setup can be random.

출처 · Sources

확인 · Checked: 2026-11-04