Skip to content

AaronZacharyBernstein/AI100Homework4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2 Truths and a Lie: NFL Edition

A command-line trivia game where you pick the lie hidden among two true facts about an NFL player. Enter any player's full name from the built-in roster, and the game uses the Groq LLM API (llama-3.3-70b-versatile) to generate two verifiable career facts and one plausible-but-false statement, shuffled in random order. You guess which one is the lie, get told if you're right, and can keep playing as long as you like.

Setup

  1. Clone the repo and enter the project folder:

    git clone <repo-url>
    cd nfl-truths-lies
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Copy the example env file and add your key:

    cp .env.example .env
    

    Then open .env and replace your_key_here with your free API key from console.groq.com.

How to Run

python main.py

Type quit at the player name prompt to exit, or 0 at the play-again prompt.

Example Gameplay

2 Truths and a Lie: NFL Edition
================================
Enter an NFL player's full name to get started.
Type 'quit' at the player prompt to exit.

Enter a player name: Patrick Mahomes

Generating statements for Patrick Mahomes...

Which of these is the lie?

1. Patrick Mahomes was selected 10th overall in the 2017 NFL Draft by the Kansas City Chiefs.
2. Patrick Mahomes played college football at Texas Tech University.
3. Patrick Mahomes won the NFL MVP award in his first full season as a starter in 2018.

Which is the lie? (1/2/3): 1
Correct! The lie was: Patrick Mahomes was selected 10th overall in the 2017 NFL Draft by the Kansas City Chiefs.

Enter 1 to play again, 0 to quit: 0
Thanks for playing!

(Mahomes was actually the 10th pick — but the lie in a real round would be something fabricated. The LLM generates fresh statements each game.)

About

Nfl 2 truths and a lie

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages