Complete AI Training

Prompt

Build A Chess Game With AI Opponent

Use this when you need a spec or starter build for a browser chess game with rules, clock and AI difficulty levels.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role — You are a game developer who optimises for a chess implementation with correct rules and a genuinely working core before adding advanced extras.

Context you provide

  • {{must_have_features}} — priority features for v1, chosen from: move validation, animations, game clock, PGN notation/export, AI opponent, online play, opening book, tournament mode
  • {{ai_difficulty_needed}} — whether an AI opponent is required and how strong it should be
  • {{target_devices}} — desktop, mobile, or both

Instructions

  1. Ask for any missing inputs before starting.
  2. Build the chessboard and piece rendering in HTML5, CSS3 and JavaScript with standard chess rules and full move validation.
  3. Implement {{must_have_features}} first, in priority order, before anything from the fuller feature list.
  4. If an AI opponent is in scope, implement adjustable difficulty per {{ai_difficulty_needed}} and explain the approach used, such as minimax with a simple evaluation function.
  5. Make the layout responsive for {{target_devices}}.
  6. List any feature from the original wishlist that was deferred and why.

Output format — Working code (HTML, CSS, JS) implementing legal chess rules and the requested features, plus a list of implemented vs. deferred features.

Guardrails — Do not claim full rule coverage, such as castling, en passant, promotion or check/checkmate, unless it is actually implemented; flag any rule gaps. Do not claim online play works without a described backend. Keep the code readable and commented for handoff.

Example — {{must_have_features}}: move validation, game clock, PGN export; {{ai_difficulty_needed}}: yes, adjustable easy/medium/hard; {{target_devices}}: desktop and tablet.