A compact Python toolkit for analysing gamers behavioural data and chatting with them through locally‑run Llama 2 models. The project demonstrates end‑to‑end ML: clustering, classification, sentiment analysis and an interactive recommendation bot. Using the K-means and RandomForest pipeline for optimal prediction capabilities.
- Data profiling — K-Means clustering (
TrainProfiler.py
) categorizes players into six intuitive segments. - Engagement prediction — Random-Forest classifier (
RFTrainBot.py
) forecasts each player's engagement level. - Three chatbots
- Heavy — fully automated ML + Llama; uses regex to extract user features (
Chatbot_Heavy_Model.py
). - Light — semi-automated, keyword-triggered ML for user-feature extraction (
Chatbot_Lighter_Model.py
). - Stupid — rule-based fallback with canned responses (
Chatbot_Stupid.py
).
- Heavy — fully automated ML + Llama; uses regex to extract user features (
- Sentiment and keyword tracking with NLTK.
- Local Llama 2 inference via llama-cpp-python (no external API keys required).
Now you should be able to run it.
Wish to try my models?You can try editing the n_clusters in TrainProfiler.py. There's quite a few other settings to mess around with aswell. Watch out for the context window, the max is 4096, setting it higher results in crashing the program.