A high-performance backend engine designed for the Arcadia MMORPG world, implemented for the CS321 — Algorithms Analysis and Design course at Cairo University. This project integrates advanced data structures, dynamic programming, graph algorithms, and greedy scheduling into one cohesive engine.
The Arcadia Engine is a modular library consisting of four major subsystems:
-
Registry – Player lookup, leaderboards, and auction systems using:
- Custom Hash Table (with double hashing)
- Skip List leaderboard
- Red-Black Tree auction house
-
Inventory System – Player loot and backpack management using:
- Partition DP (Loot Splitting)
- 0/1 Knapsack DP (Inventory Packer)
- String DP (Chat autocorrect)
-
Navigator – World traversal and safety algorithms:
- Path existence (DFS)
- Minimum bribe MST (Kruskal)
- All-pairs shortest path (Floyd–Warshall)
-
Kernel – Server task scheduling:
- CPU task scheduler with cooldown interval (Greedy)
The-Arcadia-Engine/
├── ArcadiaEngine.h # Provided — must NOT be changed
├── ArcadiaEngine.cpp # Full implementation
├── TeamInfo.txt # Team member details
└── README.md # This file
- PlayerTable: Custom hash function + double hashing.
- Leaderboard: Skip List with
O(log n)insertion, deletion, search, andgetTopN(n). - AuctionTree: Fully implemented Red-Black Tree with all invariants preserved.
- optimizeLootSplit: Partition DP minimizing difference.
- maximizeCarryValue: 0/1 Knapsack DP.
- countPossibleOriginals: String DP for autocorrect.
- pathExists: BFS/DFS connectivity.
- minBribeCost: MST variant using weighted cost conversion.
- sumOfShortestPaths: All-Pairs Shortest Path (Floyd–Warshall) returning binary string.
- leastInterval: Greedy CPU scheduler respecting cooldown constraints.
| Subsystem | Algorithm | Complexity |
|---|---|---|
| Hash Table | Division + Double Hashing | O(1) avg |
| Skip List | Randomized multilevel list | O(log n) |
| Red-Black Tree | Self-balancing BST | O(log n) |
| Loot Split | Subset-sum DP | O(n × sum) |
| Knapsack | 0/1 DP | O(n × W) |
| String DP | Linear transitions | O(n) |
| Path Existence | DFS | O(V + E) |
| MST | Kruskal | O(E log V) |
| APSP | Floyd–Warshall | O(V³) |
| Scheduler | Greedy max-frequency | O(n) or O(n log n) |
This project was submitted as part of:
CS321 — Algorithms Analysis and Design
Faculty of Computing and Artificial Intelligence, Cairo University
All work complies with the course guidelines and plagiarism policy.
This project is licensed under the MIT License. You are free to use, modify, distribute, and build upon this software, provided that the original copyright notice and permission notice are included in all copies or substantial portions of the software.