1 of 8

Code the Vote

Mike Patraw

University of California, Berkeley

Master of Information and Cyber Security

Jason Yoon

Southern Methodist University

Master of Science - Data Science

Rishav Raj

Southern Methodist University

Master of Science - Computer Science

Tina Pai

Southern Methodist University

Master of Science -

2 of 8

Welcome to the Presidential Debate Simulator

An interactive platform designed to simulate debates between Donald Trump and Joe Biden, featuring the user as the interviewer asking questions. The user can vote for their preferred answer, and see at the end who won their debate!

Objective:

The primary objective of the Presidential Debate Simulator is to offer an educational tool that fosters critical thinking and engagement in political discourse, making the learning process interactive and fun.

Key Features:

  • Realistic Responses: Generates responses that represent the platforms and attitudes of Donald Trump and Joe Biden, while maintaining a neutral tone.
  • User Interaction: Allows users to enter their own questions and receive debate-style responses from the simulated candidates.
  • Voting System: Users can vote for their preferred responses without knowing the candidate they are choosing.
  • Random Debate Topics: Provides a rotating selection of debate topic ideas to inspire user engagement.

3 of 8

How to use

  1. Enter a Question: Type a question into the provided input field and click "Ask".
  2. Read Responses: View the generated responses from Candidate A and Candidate B.
  3. Vote: Click on the "Vote" button for the response you find most convincing.
  4. View Results: After voting on multiple questions, click "End Debate" to see the overall results and which candidate won based on user votes.

4 of 8

See User Voting Insights

  • Gameplay results can be collected and analyzed for voting insights
  • E.g. popular topics, preference toward biden or trump in each category, common misconceptions, overall election forecast

5 of 8

How Access Minimum Viable Product

  • SETUP:
    1. Locate Files on GITHUB: Find the Github repository here.
    2. Download Files to /desktop/debate-simulator: Files for download; “script.js”, “styles.css”, “index.html”, “voting_viz.ipynb”, “mock_data_results.csv”.
  • PLAY:
    • Double Click on “index.html”: linked files will automatically run and display the application inside user’s chosen web browser
  • SEE ANALYTICS:
    • Open voting_viz.ipynb and run the notebook and save: this will read the mock data from mock_data_results.csv and create the graphs. In a real application, the data would be obtained from the database and dynamically categorized using a model to create this dataset.
    • In the terminal, run jupyter nbconvert --to html --no-input voting_viz.ipynb : this will export the graphs from the latest saved version of the notebook to an html file
    • Open voting_viz.html: this will open the browser window and display voter insight graphs

NOTE: Ensure file names do not change and they are located inside the same “debate-simulator’ folder.

6 of 8

Future works

Database Integration:

  • Implement a robust database to store user interactions, voting data, and debate questions.
  • Ensure secure data storage with encryption and regular backups.
  • Orchestrate ETL pipelines to feed data from database to visualizations

Server-Side Logic:

  • Develop comprehensive server-side logic to handle complex queries, manage user sessions, and ensure seamless application performance.
  • Optimize server resources to handle high traffic during peak usage times.

State Management:

  • Utilize state management techniques to maintain a consistent user experience.
  • Implement libraries like Redux or Context API for efficient state handling in a large-scale application.

Real-Time Updates:

  • Enable real-time updates to reflect voting trends and user interactions instantly.
  • Use WebSockets or Server-Sent Events (SSE) for low-latency data transfer.

Vote Validation - IP Checking:

  • Implement IP-based vote validation to limit voting to once per day per user.
  • Allow users to interact with the interface but restrict subsequent votes to maintain fair results.

7 of 8

Future works (Cont)

Improved Voting Results Dashboard:

  • Beautify and improve visualizations to provide more interesting and detailed insights on voting results.
  • Add daily incremental voting data to update dashboard

Fine-Tuning Machine Learning Models:

  • Continuously fine-tune ML models using current debate transcripts to improve response accuracy.
  • Focus on preventing hearsay and false information by exclusively using verified transcripts for training.
  • Dynamically classify user questions into categories

Enhanced Security Measures:

  • Implement advanced security protocols to protect user data and prevent unauthorized access.
  • Regularly update security policies to address emerging threats and vulnerabilities.

User Authentication:

  • Introduce user authentication to personalize the experience and track individual voting patterns.
  • Enable features like account creation, login, and user profile management.

User Feedback and Analytics:

  • Collect user feedback to identify areas for improvement and enhance user satisfaction.
  • Use analytics to monitor user engagement and optimize the application's features accordingly.

8 of 8

References

  1. API platform | OpenAI
  2. Annual Messages to Congress on the State of the Union (Washington 1790 - the present) | The American Presidency Project (ucsb.edu)
  3. Comprehensive Database of Former President Trump Transcripts