Skip to content

aravraghu/hackytics_cricscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CricScript

Hackytics 2026 Project by Arav and Ayan Raghunathan

Overview

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.

Running the simulation script

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.csv

By 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.

Supported input formats

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 ball coded as 0.1, 1.4 etc, with fields such as runs_off_bat and wicket_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.

Actian VectorAI DB integration

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.

Streamlit app

Launch the web UI with:

streamlit run app.py

Upload a CSV file with ball‑by‑ball data and press Start Simulation for interactive charts of momentum and win probability.

About

Hackytics 2026 Project by Arav and Ayan Raghunathan

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages