MatrixNet is a graph-based simulation engine developed in Java for the Resistance to design and analyze covert networks inside the Matrix. As the "Chief Architect," this system manages Hosts (nodes) and Backdoor Tunnels (edges) to facilitate secure communication while avoiding Agent detection.
The project focuses on advanced Graph Theory algorithms, including multi-objective pathfinding, network connectivity analysis, and vulnerability detection (articulation points & bridges).
- Spawn Hosts: Create secure access points (Nodes) with specific clearance levels.
- Link Backdoors: Establish bidirectional tunnels (Edges) with defined Latency, Bandwidth, and Firewall properties.
- Seal/Unseal: Dynamically toggle the availability of tunnels to simulate Agent interference.
-
Multi-Objective Optimization: Finds the optimal route for operatives based on a strict priority hierarchy:
-
Lowest Dynamic Latency: Calculates effective latency considering a "Congestion Factor" (
$\lambda$ ). - Fewest Hops: Minimizes the number of segments.
- Lexicographical Order: Tie-breaking based on Host IDs.
-
Lowest Dynamic Latency: Calculates effective latency considering a "Congestion Factor" (
- Constraints: Routes must adhere to minimum bandwidth requirements and per-hop firewall clearance levels.
- Breach Simulation:
- Articulation Points: Detects if removing a specific Host fragments the network.
- Bridges: Detects if removing a specific Backdoor disconnects the graph.
- Oracle Report: Generates comprehensive topology statistics, including connected components, cycle detection, and average network metrics.
- Language: Java
- Core Concepts: Graph Traversal (BFS/DFS), Shortest Path Algorithms (Dijkstra adaptation), Tarjan's Algorithm (or similar DFS-based logic for cut vertices/bridges).
- Constraints:
- Custom Data Structures: No built-in Java Collections allowed (except
ArrayListandLinkedList). - Performance: Optimized to handle large-scale graphs (~100,000 Hosts, ~500,000 Backdoors) within strict time limits (5-30 seconds).
- Custom Data Structures: No built-in Java Collections allowed (except
- Clone the repository:
git clone <repository-url>
- Navigate to the source folder:
cd src - Compile the project:
javac *.java - Run the simulation with input/output files:
java Main input.txt output.txt
The system processes a stream of console commands from an input file:
spawn_host <id> <clearance>link_backdoor <id1> <id2> <latency> <bandwidth> <firewall>trace_route <id1> <id2> <bandwidth> <congestion_lambda>simulate_breach <id>(Host or Backdoor)oracle_report
This project was developed as part of the CmpE 250 Data Structures and Algorithms course (Fall 2025).