
INTERNATIONAL JOURNAL OF LATEST TECHNOLOGY IN ENGINEERING,
MANAGEMENT & APPLIED SCIENCE (IJLTEMAS)
ISSN 2278-2540 | DOI: 10.51583/IJLTEMAS | Volume XIV, Issue X, October 2025
www.ijltemas.in Page 957
Design and Implementation of a Real-Time, Multi-Strategy AI-
Powered Web-Based Strategy Game.
Yash Chaudhari, Satyveer Chauhan, Kartikey Aggarwal, Dr. Sangeeta Mishra
Electronics and Telecommunications, Thakur College of Engineering and Technology Mumbai, Maharashtra
DOI:
https://doi.org/10.51583/IJLTEMAS.2025.1410000116
Abstract— The paradigm of web applications has shifted from static content delivery to dynamic, real-time interactive systems.
This paper presents a comprehensive study on the design, implementation, and performance evaluation of "Sphere Strike," a full-
stack, browser-based abstract strategy game. While the core technologies utilized Flask, Socket.IO, and heuristic-based AI are
well-established, the novelty of this work lies in their specific synthesis to address a discernible gap in existing digital versions of
the game "Chain Reaction." We detail a client-server system architected on a Python Flask backend, utilizing the Socket.IO
protocol over WebSockets to facilitate low-latency, event-driven communication. A primary contribution is the engineering of a
multi-strategy, heuristic-based Artificial Intelligence (AI) agent with tiered difficulty levels. The agent's intelligence is derived
from a detailed heuristic evaluation function, and its most advanced tier employs a 1-ply lookahead search to identify and exploit
game-winning tactical opportunities. The system was containerized using Docker and deployed on a cloud platform (Render.com)
to validate its production-readiness. Empirical performance evaluation confirms that the system maintains a mean round-trip
network latency of under 200ms and an AI move calculation time consistently under 100ms, delivering a seamless user
experience.
Keywords: Real-Time Systems, WebSockets, Socket.IO, Flask, Game AI, Heuristic Functions, Minimax, Client-Server
Architecture, Multiplayer Games, Human-Computer Interaction, System Design.
I. Introduction
The evolution of web technologies, particularly the standardization of the WebSocket protocol (RFC 6455) [2], has enabled the
browser to function as a viable platform for complex, stateful, real-time applications. This has democratized access to interactive
experiences, removing the friction of native application installation. Within this context, abstract strategy games of perfect
information whose outcomes are determined solely by player skill provide a compelling domain for engineering research. They
present significant challenges in network synchronization, state management, and the design of intelligent non-player agents.
The classic game "Chain Reaction" is an exemplar of emergent complexity, where simple rules generate a vast strategic decision
space. A review of its existing digital implementations reveals a significant market and technological gap: a near-total focus on
local, "pass-and-play" multiplayer, with a notable absence of a true online, real-time competitive environment.
This paper posits that a significant contribution can be made by synthesizing the proven strategic gameplay of a classic abstract
game with a modern, real-time, networked architecture. While the individual components (Flask, Socket.IO) are established, their
original application and integration to solve this specific problem constitutes the core of this research. We present "Sphere
Strike," a web-based implementation engineered to fill this gap. The primary contributions of this paper are:
The design and validation of a scalable, event-driven server architecture for managing concurrent, stateful game
sessions.
The implementation and analysis of a multi-strategy, heuristic-based AI agent that provides a tiered and challenging
experience.
An empirical performance evaluation of the deployed system, providing quantitative metrics on network latency and
computational performance.
II. Literature Review and Foundational Research
The design of Sphere Strike is informed by a synthesis of established principles from several engineering disciplines.
Domain: Networked Systems and Communication Protocols
A robust multiplayer system requires a carefully designed network architecture.
Architectural Pattern: A centralized client-server model was selected over a peer-to-peer (P2P) topology. As established in
foundational networking literature (Kurose & Ross, 2016), [1] a centralized server acts as the single source of truth. This is a
critical design choice for turn-based games, as it provides authoritative state management, thereby preventing client-side cheating
and simplifying data synchronization logic.
Communication Protocol: The system utilizes the WebSocket protocol for all real-time communication. Unlike the high latency,
request-response nature of HTTP, WebSockets provide a persistent, full-duplex communication channel over a single TCP
connection. This allows for the immediate, low-overhead transmission of game events, which is essential for a responsive user