5/5/10

Summary

This 3D Chinese chess game is completely written in Java. The basic GUI part is constructed with widget toolkit Swing, and the 3D graphics part is constructed with Java 3D API.

Game features:
  1. The game is written in Java, which means it can be played on web browser. Of course, it's necessary to modify pieces of code using, such as, Java applet.
  2. When you press left button of mouse on a piece, all possible moves of the piece will be displayed on the chess board. This is a big different from other similar Chinese chess game.
  3. This game allows you doing drag & drop operation on a piece to achieve movement. But most of other chess games don't.
Weak points:
  1. Chess AI of this game is weak. Actually, if I have much more knowledge about AI, I think I can write a better one than now.
  2. No shadows for the pieces. Since in Java 3D, the shadow is geometry object, and it's position must be dynamically computed while the piece is moving. So, creating shadows is a little bit hard. (Java 3D tutorial chapter 6 talks about how does shadow mechanism work.)

5/2/10

AI

This game supports three levels of chess AI which the level 3 is the most difficult one. The AI level can be changed through game option menu. The default level is 2.

Description of three AI levels:
  1. AI makes a random move. Even though the move is randomly picked from all possible moves. However, the probability that the AI move attacks your (red) pieces is bigger than the probability that it doesn't.
  2. Be careful, at this level, AI will try to attack your (red) General and defend black General as possible as it can.
  3. For each piece, AI assigns it an appropriate point. And for all positions on the board, AI gives them different points, that the more important position has more bigger point. For all possible moves, AI evaluates each of them and picks the best move which has biggest point. Of course, the level 1 and 2 are still valid at this level.