Hackytics 2026 Project by Arav and Ayan Raghunathan
This repository contains a simple cricket match simulation engine built on top of a feature extractor, a momentum calculator, and an Actian Vector‑backed similarity store. There is also a Streamlit app for interactive visualization.
A standalone driver is provided in simulation.py. You can invoke it
from the command line:
python simulation.py -i path/to/ball_by_ball.csvBy default the script will attempt to connect to an Actian Vector
database using the hard‑coded ODBC settings. If the pyodbc package is
not installed or the connection cannot be opened, the script falls back
to an in‑memory stub so the simulation still runs.
Additional flags:
-d/--database– supply a custom ODBC connection string.
When supplying ball‑by‑ball data (either via upload or from the archive
folder), the loader will transparently normalise a number of common
schemas:
- standard columns
over,ball,runs,wicket - Kaggle‑style deliveries with
ballcoded as0.1,1.4etc, with fields such asruns_off_batandwicket_type - any CSV containing the example dataset located in the repository root
under
deliveries.csv/deliveries.csv– this path is automatically detected and presented as an archive file.
The project includes the actian-vectorAI-db-beta repository under
actian-vectorAI-db-beta which ships the Python client (cortex).
If you install the wheel file from that folder
(pip install ./actian-vectorAI-db-beta/actiancortex-0.1.0b1-py3-none-any.whl),
the application will automatically prefer the Cortex client over the
legacy pyodbc driver when performing vector operations. The
actian/actian_vector_engine.py module detects the available client and
uses it to create collections, upsert vectors, and perform similarity
searches.
When using the Streamlit UI there is now a Actian VectorAI DB address
input in the sidebar (default localhost:50051). Point this at your
running VectorAI DB instance (see the beta repo’s README for Docker
startup instructions) and the app will connect to it when you press
Start Simulation.
This setup makes it easy to run the simulation against a local VectorAI DB instance once you have Docker running, or target a remote service. The output is printed to the console as a sequence of dictionaries, one per over, containing both the model probability and the momentum score.
Launch the web UI with:
streamlit run app.pyUpload a CSV file with ball‑by‑ball data and press Start Simulation for interactive charts of momentum and win probability.