Standard Portal Chess v1.1 - Rules and Gameplay

Welcome to Standard Portal Chess v1.1, a fascinating variant of traditional chess that introduces portals—special squares that allow pieces to teleport across the board. This game combines classic chess strategy with unique portal mechanics, offering a fresh and exciting challenge. Below are the complete rules and gameplay mechanics, derived straight from the game’s code.

Objective

The goal remains the same as in classic chess: to checkmate your opponent’s king—place it under an unavoidable threat of capture. However, portals add a twist, making strategic positioning and movement more dynamic.

Board Setup

Players and Turns

Piece Movement

All pieces move as in standard chess, with additional rules for portals:

Note: Movement stops at a portal or piece (friendly or enemy). Capturing an enemy piece on a non-portal square works as usual.

Portal Mechanics

Portals are the defining feature of this game, allowing pieces to teleport instantly across the board. Here’s how they work:

Key Rule: A piece cannot stay on the entry portal after capturing—it must exit to another portal, ensuring dynamic movement.

Game States

Gameplay Features

AI Behavior

The AI (Black by default) uses a minimax algorithm with alpha-beta pruning to select moves, prioritizing:

It evaluates all legal moves, including portal options, and chooses the best based on a calculated score.

Winning the Game

The game ends when: