Deal or No Deal

Sarah Patterson, Virginia Military Institute, Applied Math
Author Profile
Initial Publication Date: October 7, 2025

Summary

Your task is to create a simplified version of the game show Deal or No Deal using MATLAB. This game allows users to select a briefcase and play through several rounds, revealing other cases and receiving offers from the "banker." The game ends when the user accepts a deal or opens all remaining cases.

This project is a capstone opportunity to demonstrate your ability to use loops, conditionals, arrays, and user input in a structured and interactive program.

Share your modifications and improvements to this activity through the Community Contribution Tool »

Learning Goals

🎯 Learning Objectives
By completing this project, you will:

Implement loops to control game rounds and turns.

Use conditional statements for game logic and decision-making.

Work with arrays to manage game data (case values, remaining options).

Use randomization to assign case values.

Practice user input handling and program flow.

Context for Use

This activity was developed for an introduction to programing course with 15 students.

Students were freshman and sophomores majoring in math and physics.

This activity was assigned as a weekly homework assignment near the end of the course.

Students need to use flow control and basic data management.

Description and Teaching Materials

🕹️ Game Requirements
1. Setup
There are 15 briefcases (or another reasonable number—you may adjust as long as it's >10).

Each case is randomly assigned a money value from a predefined list:

values = [0.01, 1, 5, 10, 25, 50, 75, 100, 200, 500, 750, 1000, 5000, 10000, 25000];
The user selects one case to "hold" at the start of the game.

2. Rounds
In each round, the user opens a set number of unopened cases (e.g., 3 in Round 1, 2 in Round 2, then 1 per round).

After each round, the program calculates a banker offer (e.g., the mean of remaining values × a factor like 0.75).

Display the offer and ask the player:
"Deal or No Deal?"

If they accept, the game ends and the deal value is reported.

If they reject, continue to the next round.

3. End of Game
If the user rejects all offers and only two cases remain (the one they picked and one more), the final value is revealed.

Report what they won and what was in the other case.

🧮 Example Banker Offer Calculation
offer = 0.75 * mean(remaining_case_values);
You can get creative with how this offer changes over time!

💡 Optional Features (Extra Credit)
Track and display which case numbers are still in play

Display values that have been eliminated

Plot remaining values after each round

Add simple graphics with uifigure or text-based UI elements

Customize number of cases, case values, or round structure.

📝 What to Submit
deal_or_no_deal.m: Your main MATLAB script

A brief write-up (deal_project_report.pdf) that includes:

A short description of your program

Any extra features you added

Reflections on what you learned


Deal Or No Deal (Microsoft Word 2007 (.docx) 214kB Sep30 25)



Teaching Notes and Tips

Some students are not familiar with the game show Deal or No Deal. Showing a clip in class can help students to understand how their program should work.

Encourage students to write pseudo code before attempting to program this project. Providing or talking through pseudo code can also help students with less programing experience.


Assessment

📊 Grading Breakdown (out of 50)
Criteria Points
Correct setup and random case assignment 10
User selects and holds one case 10
Case-opening logic using loops and branching 10
Banker offer calculation and decision logic 10
Proper game ending and result reporting 5
Code readability, comments, write-up and explanation 5
Extra features (up to +5 bonus) +5

References and Resources