Skip to content

Tauses/EngageMachineLearning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Gaming Chatbot & Player Profiler

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.

Key Features

  1. Data profiling — K-Means clustering (TrainProfiler.py) categorizes players into six intuitive segments.
  2. Engagement prediction — Random-Forest classifier (RFTrainBot.py) forecasts each player's engagement level.
  3. Three chatbots
    1. Heavy — fully automated ML + Llama; uses regex to extract user features (Chatbot_Heavy_Model.py).
    2. Light — semi-automated, keyword-triggered ML for user-feature extraction (Chatbot_Lighter_Model.py).
    3. Stupid — rule-based fallback with canned responses (Chatbot_Stupid.py).
  4. Sentiment and keyword tracking with NLTK.
  5. Local Llama 2 inference via llama-cpp-python (no external API keys required).

REQUIREMENTS

In order to run the light and heavy model, you must first install Visual Studio BuildTools for desktop. https://visualstudio.microsoft.com/visual-cpp-build-tools/ Under "Workloads" after installing the BuildTools Choose "Desktop Development with C++" and wait for it to install the packages.

Now you should be able to run it.

Customising the Models

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.

About

Submitted as part of my Machine Learning exam.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages