← Back
Ngôn ngữ

Cờ Cố Đô

Đại Việt vs Invader · Thành trì layout (Cổ Loa, Thăng Long, Vauban) · River & terrain

Lượt Invader (Đen)
Chế độ:
Hiển thị quân:
Clock:
I
Invader
Đ
Đại Việt

Chess Network Digital Timer

Professional Timekeeping for Competitive Chess


Enhance your chess practice with the Chess Network Digital Timer - engineered for competitive precision and strategic time management. Perfect for tournament play, training sessions, and serious chess improvement.

Key Features

Professional Display: High-contrast LED screen with tournament-standard visibility. Multi-Alarm System: Customizable alerts for different time controls and warning signals. Network Integration: Syncs with Chess Network platform for seamless tournament management.

Chess Training Benefits

Time Discipline: Master critical time control skills for competitive success. Pattern Recognition: Built-in chess timing patterns for various game phases. Performance Analytics: Track your time management improvement across sessions.

Technical Specifications

Model: Chess Network Pro Timer CN-2024
Display: 2.4" High-Contrast LED Screen
Accuracy: ±0.01 seconds precision
Perfect for: Tournament players, chess coaches, chess clubs, online streamers

Chess Events Schedule

- Midnight Masters Tournament

Strategic Network Advantage: The Power of Play in Professional Networking

Building Meaningful Connections Through the Transformative Power of Strategic Play


Experience the power of play: Connect with fellow players, join innovative teams, challenge adaptive AI opponents, and learn from strategic mentors—all through the joy of gameplay


Authentic Intelligence Through the Power of Play

Our Chess Network: The power of play reveals genuine strategic thinking through every move, creating authentic connections based on proven analytical abilities demonstrated in real-time gameplay. LinkedIn: Professional networking through documented achievements and career milestones. Facebook: Social connections through lifestyle sharing and personal updates. Chess players form genuine bonds through the power of play, complementing traditional networking approaches with demonstrated intelligence.


Active Strategic Engagement Through Play

Our Chess Network: The power of play demands active participation, critical thinking, and strategic decision-making in every engaging match. Traditional Social: Passive content consumption through browsing, sharing, and community interaction. Chess players showcase intelligence, patience, and planning under pressure through the power of play—qualities employers value, creating a community where intellectual capability is demonstrated through interactive engagement.


Universal Strategic Language of Play

Our Chess Network: The power of play speaks a universal language of strategy that transcends borders, enabling authentic international connections based on shared intellectual pursuits through gameplay. Traditional Platforms: Communication limited by shared languages and cultural contexts. Chess creates meaningful global partnerships through the power of play, complementing existing platforms and offering additional pathways for international professional relationships.


Dynamic Performance Portfolio Through Play

Our Chess Network: The power of play provides dynamic demonstration of critical thinking, pattern recognition, and decision-making under pressure through engaging competitive performance. Traditional Networks: Static professional profiles with documented achievements and career progression. Chess players provide real-time validation of strategic excellence through the power of play, creating a living portfolio that enhances traditional professional credentials with proven performance.


Visual Network Comparison

Feature
Chess Network
LinkedIn
Facebook
Intelligence Validation
Real-time strategic thinking
Documented achievements
Engagement Type
Active strategic participation
Professional networking
Global Reach
Universal strategy language
Language-based communication
Portfolio Type
Living performance portfolio
Career progression profile
Chapter IThe River1 / 8

Control the Midfield

The two river rows in the centre are the board's hinge. Pieces that cross the river gain new powers — Navy slides sideways, Guerrillas enter ambush range. Contesting these rows forces your opponent into awkward retreats.

Tip: Place a General (Tướng) aimed at the river early. It slides up to 3 squares and threatens the crossing before your opponent can fortify.

How AI Predicts Your Next Move

Markov Chains & Chess Intelligence

Every time you move a piece, the engine running this board updates a probability model — one that treats the entire chess game as a Markov process. Here's how it works.

What is a Markov Chain?

A Markov chain is a mathematical system that hops between states with fixed probabilities — where the next state depends only on the current state, not on how you got there. In chess terms: the legal moves available right now tell you everything you need to know.

The Markov property in chess: Given the current board position, the probability of each next move does not depend on the sequence of moves that produced this position. Only the state — the piece layout — matters.

Building the Transition Matrix

The AI builds a transition matrix P[s → s'] where each entry is the probability of moving from board state s to state s'. This matrix is never fully precomputed — instead the engine approximates it through:

  1. Move frequency tables — positions from past games, weighted by player style and opening choice.
  2. Alpha-beta search — minimax tree pruning that evaluates future states and selects transitions with the highest expected value.
  3. Heuristic priors — terrain bonuses (river, forest, mountain) shift probability mass toward moves that exploit the map.

Predicting Opponent Moves

At each turn the engine maintains a belief distributionover the opponent's likely next moves. It is updated via Bayes' rule every time the opponent acts:

P(move | position) ∝ P(position | move) × P(move)

The prior P(move)starts uniform — all legal moves equally likely — and sharpens as the game progresses. After observing an opponent's preferred river crossings or ambush setups, the AI assigns higher probability mass to matching future moves.

Terrain as a State Modifier

Vietnam Chess's terrain system makes this Markov model richer than a standard chess engine. Terrain tiles create non-uniform edge weights in the state graph:

TerrainEffect on transition probability
Forest↑ weight for Du Kích / Nông Dân (ambush threat zones)
River↑ weight for Thủy Quân crossing; ×0 for Voi
Mountain↑ weight for Chỉ Huy leap; blocks Cannon line-of-sight

From Theory to the Engine

The engine powering this board runs a depth-6 alpha-beta search with terrain-aware evaluation. Each leaf node is scored with a value function that approximates the stationary distribution of the Markov game — the position where neither player can improve their expected outcome unilaterally. That equilibrium is a Nash equilibrium, and the engine's goal is to play toward it.

“The best chess engines don't just see further — they assign probabilities to where you wantto go, and play to narrow your options until only bad moves remain.”

The Markov framing also explains why openings matter: early moves collapse the state space rapidly. Each exchange eliminates branches, making the transition matrix sparser and the AI's predictions sharper with every turn.

Chess Community

Live Chess Discussions & Strategy Sharing


Join the vibrant chess community where players from around the world share strategies, discuss games, and connect over their passion for chess. Watch real-time conversations unfold as players exchange insights and celebrate victories together.

Live Chess Chat0 players online

Cờ Color Palette

This chess application features a proprietary color palette meticulously crafted for optimal visual hierarchy and user experience. Each color is precision-tuned for both light and dark themes, ensuring exceptional readability and aesthetic harmony throughout the interface.

Navy Recruitment & Yết Kiêu Techniques

Ancient Maritime Warfare Skills & Modern Recruitment Strategies


The Thủy Quân recruitment process combines traditional Vietnamese maritime heritage with modern naval warfare training. Inspired by legendary figures like Yết Kiêu (Phạm Hữu Thế), the Trần triều đệ nhất đô soái thuỷ quân (First Dynasty Naval Commander), our recruitment focuses on exceptional water combat skills and unwavering loyalty.

Navy Recruitment Process

Physical Assessment

Water endurance, swimming proficiency, and underwater navigation tests

Combat Training

Maritime warfare tactics and stealth infiltration techniques

Loyalty Evaluation

Character assessment and commitment to naval service

Yết Kiêu Techniques

Underwater Navigation

"Nhập thuỷ như phúc bình địa" - Moving underwater as freely as on land

  • Silent swimming techniques
  • Underwater stealth movement
  • Breath control mastery
Vessel Sabotage

Night infiltration tactics - Strategic vessel disabling

  • Drilling 20+ holes per vessel
  • Cloth plug concealment
  • Coordinated mass sinking
Stealth Survival

Concealment mastery - Hiding in plain sight

  • Natural camouflage usage
  • Pain tolerance training
  • Blood trail concealment
Loyalty & Service

Trần Hưng Đạo's trusted guard - Unwavering dedication

  • Master-servant loyalty code
  • Diplomatic protection duty
  • Elite guard service

Embedded Chess

Chess Engine Integration & Code Snippets for Embedded Systems

Please ask for a license before downloading the source code.

Core Chess Engine Implementation

Vietnam Chess Core Engine
// Vietnam Chess Engine - Core Implementation
export class VietnamChessEngine {
  private board: Board;
  private currentPlayer: Side;
  private moveHistory: Move[];

  constructor() {
    this.board = new Board();
    this.currentPlayer = Side.RED;
    this.moveHistory = [];
  }

  // Generate all legal moves for current player
  public getLegalMoves(): Move[] {
    const moves: Move[] = [];
    const pieces = this.board.getPieces(this.currentPlayer);
    
    for (const piece of pieces) {
      const pieceMoves = this.getPieceMoves(piece);
      moves.push(...pieceMoves);
    }
    
    return moves.filter(move => this.isValidMove(move));
  }

  // Execute a move and switch turns
  public makeMove(move: Move): boolean {
    if (!this.isValidMove(move)) return false;
    
    this.board.applyMove(move);
    this.moveHistory.push(move);
    this.currentPlayer = this.currentPlayer === Side.RED ? Side.BLUE : Side.RED;
    
    return true;
  }

  // AI move evaluation using minimax
  public getBestMove(depth: number = 3): Move | null {
    return this.minimax(depth, -Infinity, Infinity, true).move;
  }

  private minimax(depth: number, alpha: number, beta: number, maximizing: boolean): 
    { score: number; move: Move | null } {
    if (depth === 0) {
      return { score: this.evaluateBoard(), move: null };
    }

    const moves = this.getLegalMoves();
    let bestMove: Move | null = null;
    let bestScore = maximizing ? -Infinity : Infinity;

    for (const move of moves) {
      const tempBoard = this.board.clone();
      this.makeMove(move);
      
      const result = this.minimax(depth - 1, alpha, beta, !maximizing);
      
      if (maximizing) {
        if (result.score > bestScore) {
          bestScore = result.score;
          bestMove = move;
        }
        alpha = Math.max(alpha, bestScore);
      } else {
        if (result.score < bestScore) {
          bestScore = result.score;
          bestMove = move;
        }
        beta = Math.min(beta, bestScore);
      }
      
      this.board = tempBoard;
      if (beta <= alpha) break; // Alpha-beta pruning
    }

    return { score: bestScore, move: bestMove };
  }

  // Position evaluation function
  private evaluateBoard(): number {
    const pieceValues = {
      [PieceType.GENERAL]: 1000,
      [PieceType.ADVISOR]: 20,
      [PieceType.ELEPHANT]: 20,
      [PieceType.HORSE]: 40,
      [PieceType.CHARIOT]: 90,
      [PieceType.CANNON]: 45,
      [PieceType.SOLDIER]: 10
    };

    let score = 0;
    for (const piece of this.board.getAllPieces()) {
      const value = pieceValues[piece.type];
      const positionBonus = this.getPositionBonus(piece);
      score += piece.side === this.currentPlayer ? 
        value + positionBonus : -(value + positionBonus);
    }

    return score;
  }

  private getPositionBonus(piece: Piece): number {
    // Implement position-based evaluation
    const centerBonus = piece.type === PieceType.CHARIOT ? 10 : 5;
    const advancementBonus = piece.type === PieceType.SOLDIER ? 
      piece.side === Side.RED ? piece.row : 9 - piece.row : 0;
    
    return centerBonus + advancementBonus;
  }
}

Embedded System Integration

Microcontroller Chess Interface
// Embedded Chess Interface for Microcontrollers
#include <stdint.h>
#include <string.h>
#include "chess_engine.h"

#define BOARD_SIZE 10
#define MAX_MOVES 256

typedef struct {
  uint8_t from_row;
  uint8_t from_col;
  uint8_t to_row;
  uint8_t to_col;
  uint8_t piece_type;
  uint8_t captured_piece;
} EmbeddedMove;

typedef struct {
  uint8_t board[BOARD_SIZE][BOARD_SIZE];
  uint8_t current_player;
  uint16_t move_count;
  EmbeddedMove history[MAX_MOVES];
} ChessState;

class EmbeddedChessInterface {
private:
  ChessState state;
  VietnamChessEngine* engine;
  
public:
  EmbeddedChessInterface() {
    engine = new VietnamChessEngine();
    initializeBoard();
  }

  // Initialize board for embedded display
  void initializeBoard() {
    memset(&state, 0, sizeof(ChessState));
    state.current_player = 1; // Red starts
    
    // Place initial pieces
    setupInitialPieces();
  }

  // Get move suggestion for AI opponent
  EmbeddedMove getAIMove() {
    Move bestMove = engine->getBestMove(2); // Depth 2 for embedded
    
    EmbeddedMove embeddedMove = {
      .from_row = bestMove.from.row,
      .from_col = bestMove.from.col,
      .to_row = bestMove.to.row,
      .to_col = bestMove.to.col,
      .piece_type = bestMove.piece,
      .captured_piece = bestMove.captured
    };
    
    return embeddedMove;
  }

  // Validate user input move
  bool isValidMove(uint8_t from_row, uint8_t from_col, 
                   uint8_t to_row, uint8_t to_col) {
    Move move = {
      .from = {from_row, from_col},
      .to = {to_row, to_col}
    };
    
    return engine->isValidMove(move);
  }

  // Execute move and update state
  bool makeMove(uint8_t from_row, uint8_t from_col, 
                uint8_t to_row, uint8_t to_col) {
    if (!isValidMove(from_row, from_col, to_row, to_col)) {
      return false;
    }

    Move move = {
      .from = {from_row, from_col},
      .to = {to_row, to_col}
    };

    // Update embedded state
    EmbeddedMove embeddedMove = {
      .from_row = from_row,
      .from_col = from_col,
      .to_row = to_row,
      .to_col = to_col,
      .piece_type = state.board[from_row][from_col],
      .captured_piece = state.board[to_row][to_col]
    };

    state.history[state.move_count++] = embeddedMove;
    state.board[to_row][to_col] = state.board[from_row][from_col];
    state.board[from_row][from_col] = 0;
    state.current_player = 3 - state.current_player; // Switch player

    return engine->makeMove(move);
  }

  // Get board state for display
  const uint8_t* getBoardForDisplay() {
    return (const uint8_t*)state.board;
  }

  // Check game status
  uint8_t getGameStatus() {
    if (engine->isInCheckmate()) return 2; // Checkmate
    if (engine->isInStalemate()) return 1; // Stalemate
    if (engine->isInCheck()) return 3;     // Check
    return 0; // Normal
  }

private:
  void setupInitialPieces() {
    // Setup Red pieces (bottom)
    state.board[9][0] = PieceType::CHARIOT;
    state.board[9][1] = PieceType::HORSE;
    state.board[9][2] = PieceType::ELEPHANT;
    state.board[9][3] = PieceType::ADVISOR;
    state.board[9][4] = PieceType::GENERAL;
    state.board[9][5] = PieceType::ADVISOR;
    state.board[9][6] = PieceType::ELEPHANT;
    state.board[9][7] = PieceType::HORSE;
    state.board[9][8] = PieceType::CHARIOT;
    state.board[7][1] = PieceType::CANNON;
    state.board[7][7] = PieceType::CANNON;
    
    // Soldiers
    for (int i = 0; i < 9; i += 2) {
      state.board[6][i] = PieceType::SOLDIER;
    }

    // Setup Blue pieces (top) - similar pattern
    // ... (implementation continues)
  }
};

// Arduino/ESP32 Integration Example
class ChessDisplayController {
private:
  EmbeddedChessInterface* chess;
  uint8_t display_buffer[BOARD_SIZE][BOARD_SIZE];
  
public:
  ChessDisplayController(EmbeddedChessInterface* game) : chess(game) {}

  void updateDisplay() {
    const uint8_t* board = chess->getBoardForDisplay();
    memcpy(display_buffer, board, sizeof(display_buffer));
    
    // Render to LCD/OLED display
    renderBoardToDisplay();
  }

  void handleUserInput(uint8_t row, uint8_t col) {
    static uint8_t selected_row = 255, selected_col = 255;
    
    if (selected_row == 255) {
      // Select piece
      if (display_buffer[row][col] != 0) {
        selected_row = row;
        selected_col = col;
        highlightSquare(row, col);
      }
    } else {
      // Make move
      if (chess->makeMove(selected_row, selected_col, row, col)) {
        updateDisplay();
        
        // AI response
        if (chess->getGameStatus() == 0) {
          EmbeddedMove aiMove = chess->getAIMove();
          chess->makeMove(aiMove.from_row, aiMove.from_col, 
                         aiMove.to_row, aiMove.to_col);
          updateDisplay();
        }
      }
      
      selected_row = selected_col = 255;
    }
  }

private:
  void renderBoardToDisplay() {
    // Implementation for specific display hardware
    // LCD, OLED, or LED matrix rendering
  }
  
  void highlightSquare(uint8_t row, uint8_t col) {
    // Visual feedback for selected square
  }
};

Performance Optimizations

Memory-Efficient Chess AI
// Memory-Optimized Chess AI for Embedded Systems
class OptimizedChessAI {
private:
  static constexpr uint8_t MAX_DEPTH = 4;
  static constexpr uint16_t TRANSPOSITION_SIZE = 1024;
  
  // Bitboard representation for memory efficiency
  typedef uint64_t Bitboard;
  
  struct TranspositionEntry {
    uint64_t hash;
    int16_t score;
    uint8_t depth;
    uint8_t flags; // 0: exact, 1: alpha, 2: beta
  };
  
  TranspositionEntry transpositionTable[TRANSPOSITION_SIZE];
  Bitboard pieceBoards[14]; // 7 piece types * 2 colors
  
public:
  // Compact move representation (16 bits)
  typedef uint16_t CompactMove;
  
  CompactMove getBestMoveCompact() {
    CompactMove bestMove = 0;
    int16_t bestScore = -30000;
    
    // Generate moves in compact format
    CompactMove moves[256];
    uint8_t moveCount = generateCompactMoves(moves);
    
    for (uint8_t i = 0; i < moveCount; i++) {
      makeCompactMove(moves[i]);
      
      int16_t score = -negamax(MAX_DEPTH - 1, -30000, 30000);
      
      if (score > bestScore) {
        bestScore = score;
        bestMove = moves[i];
      }
      
      undoCompactMove(moves[i]);
    }
    
    return bestMove;
  }

private:
  int16_t negamax(uint8_t depth, int16_t alpha, int16_t beta) {
    uint64_t hash = calculateHash();
    
    // Transposition table lookup
    TranspositionEntry* entry = &transpositionTable[hash % TRANSPOSITION_SIZE];
    if (entry->hash == hash && entry->depth >= depth) {
      switch (entry->flags) {
        case 0: return entry->score; // exact
        case 1: return entry->score > alpha ? entry->score : alpha; // alpha
        case 2: return entry->score < beta ? entry->score : beta;   // beta
      }
    }
    
    if (depth == 0) {
      return evaluatePosition();
    }
    
    int16_t bestScore = -30000;
    CompactMove moves[256];
    uint8_t moveCount = generateCompactMoves(moves);
    
    for (uint8_t i = 0; i < moveCount; i++) {
      makeCompactMove(moves[i]);
      
      int16_t score = -negamax(depth - 1, -beta, -alpha);
      
      if (score > bestScore) {
        bestScore = score;
      }
      
      if (score >= beta) {
        // Beta cutoff
        entry->hash = hash;
        entry->score = beta;
        entry->depth = depth;
        entry->flags = 2; // beta
        undoCompactMove(moves[i]);
        break;
      }
      
      alpha = Math.max(alpha, score);
      undoCompactMove(moves[i]);
    }
    
    // Store in transposition table
    entry->hash = hash;
    entry->score = bestScore;
    entry->depth = depth;
    entry->flags = (bestScore <= alpha) ? 1 : 0; // alpha or exact
    
    return bestScore;
  }
  
  // Fast position evaluation using bitboards
  int16_t evaluatePosition() {
    int16_t score = 0;
    
    // Material evaluation
    score += popcount(pieceBoards[0]) * 900;  // Red General
    score += popcount(pieceBoards[1]) * 50;   // Red Advisor
    score += popcount(pieceBoards[2]) * 30;   // Red Elephant
    score += popcount(pieceBoards[3]) * 30;   // Red Horse
    score += popcount(pieceBoards[4]) * 90;   // Red Chariot
    score += popcount(pieceBoards[5]) * 40;   // Red Cannon
    score += popcount(pieceBoards[6]) * 10;   // Red Soldier
    
    // Subtract blue pieces
    score -= popcount(pieceBoards[7]) * 900;  // Blue General
    score -= popcount(pieceBoards[8]) * 50;   // Blue Advisor
    score -= popcount(pieceBoards[9]) * 30;   // Blue Elephant
    score -= popcount(pieceBoards[10]) * 30;  // Blue Horse
    score -= popcount(pieceBoards[11]) * 90;  // Blue Chariot
    score -= popcount(pieceBoards[12]) * 40;  // Blue Cannon
    score -= popcount(pieceBoards[13]) * 10;  // Blue Soldier
    
    // Positional bonuses
    score += evaluatePositionalFactors();
    
    return score;
  }
  
  uint8_t generateCompactMoves(CompactMove* moves) {
    uint8_t count = 0;
    
    // Generate moves using bitboard operations
    for (uint8_t pieceType = 0; pieceType < 7; pieceType++) {
      Bitboard redPieces = pieceBoards[pieceType];
      Bitboard bluePieces = pieceBoards[pieceType + 7];
      
      // Generate moves for each piece type
      count += generateMovesForPieceType(pieceType, redPieces, moves + count);
      count += generateMovesForPieceType(pieceType + 7, bluePieces, moves + count);
    }
    
    return count;
  }
  
  // Fast bitboard population count
  uint8_t popcount(Bitboard x) {
    x = x - ((x >> 1) & 0x5555555555555555);
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333);
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f;
    x = x + (x >> 8);
    x = x + (x >> 16);
    x = x + (x >> 32);
    return x & 0x7f;
  }
};

Propose Changes

Suggest New Chess Pieces & Game Mechanics


Recruiter/Dealer Chess Piece Concept

A strategic diplomatic piece that combines army recruitment with negotiation skills, adding a unique strategic layer to Vietnam Chess gameplay.

Army Recruitment

Convert neutral pieces and recover captured units to strengthen forces

Agreement Negotiation

Deal terms with opponents for strategic advantages and temporary alliances

Diplomatic Immunity

Special protection allowing safe passage through enemy territory

Piece Specifications

Name

Đại Sứ (Ambassador) / Sứ Giả (Envoy)

Movement

3 squares any direction (limited Queen range)

Ability

Recruit neutral pieces & negotiate agreements

Capture

Cannot capture directly, only diplomatic means

Position

Behind main lines, near General/King

Quantity

1 per side (strategic importance)

Recruitment Mechanics

Neutral Conversion

Convert neutral pieces to your side (2-turn cooldown)

Piece Recovery

Negotiate return of captured pieces for strategic concessions

Ally Recruitment

Form temporary alliances with opponent pieces

Agreement System

Ceasefire

No-capture zones for 3 turns

Passage Rights

Safe movement through enemy territories

Resource Exchange

Trade pieces/positions for advantages

Intelligence Sharing

Reveal opponent moves or hidden pieces

Visual Design

Đại Sứ combines diplomatic symbolism with chess aesthetics, featuring elements that represent negotiation and recruitment.

Shape
  • Wider cylindrical base for stability
  • Central handshake/diplomatic seal
  • Split dome symbolizing diplomacy
  • Engraved recruitment patterns
Colors
  • Red Side: Crimson base, gold trim, white seal
  • Blue Side: Navy base, silver trim, white seal
Alternatives
  • Classic Diplomat: Ambassador staff with ribbons
  • Modern Envoy: Minimalist communication symbols
  • Military Recruiter: Bugle/horn design
ASCII Representation
    /\______/\
   /          \
  |  (    )   |
  |   \__/    |
  |   /  \    |
  |  |    |   |
   \ \__/ /  /
    \______/  

Forrest

Beautiful 3D Forest Animation with Wind Effects


Optimized Forest Scene

Experience a production-ready forest with 2000+ trees using InstancedMesh for optimal performance and full-screen immersion.

🌲 Loading Optimized Forest...
Generating 2000 trees with InstancedMesh
🌲 Trees: 2000 (InstancedMesh)
🌱 Grass: 5000 instances
🪨 Rocks: 500 instances
⚡ Optimized rendering

Forest Features

Dynamic Wind

Realistic wind simulation affecting tree movement and leaf behavior

Seasonal Changes

Experience spring, summer, autumn, and winter variations

Day/Night Cycle

Dynamic lighting transitions between day and night scenes

Seasonal Variations

Spring Bloom

Fresh green leaves and vibrant grass growth

Summer Growth

Deep green foliage and full tree canopies

Autumn Colors

Warm orange and brown leaf transformations