How to Play
Game Guide
Welcome to Gurobean, the coffee optimization game! This guide explains how to play: how to read the shop, make your decisions, run the simulation, and compare your results against Gurobi’s optimal solution. If you’re an instructor, see the companion Teaching Guide for lesson plans and discussion ideas.

The Gurobean home screen. Choose Play the Game to start, or Championship Mode to compete. The billboard sums up what the game explores: nonlinear optimization, simulation, and decision-making under uncertainty. Click the gear button in the upper right to access education mode and find sound controls.
The story
Gurobi has opened a brand-new coffee shop called Gurobean, and business is already picking up! Customers arrive throughout the day craving freshly brewed coffee, and Gurobi needs your help running the shop efficiently.
Running a coffee shop involves many decisions. How much coffee should you brew? How should you balance hot and cold drinks? What skill level do you want the barista to have? And what prices should you charge?
Each decision affects the shop’s performance. Brewing too little coffee means some customers may leave without getting their drink. Brewing too much leads to wasted coffee. If customers arrive faster than the barista can serve them, queues get too long and customers might leave without buying anything.
Your goal is to manage the shop so that it serves customers efficiently while maximizing your 5-day profit, the score the game tracks. As the game progresses, you will encounter increasingly complex challenges involving uncertainty, queueing systems, nonlinear trade-offs, and simulation-based decision making.
Can you run the shop better than the optimizer?
The Coffee Shop
The game takes place inside the Gurobean coffee shop, where customers arrive throughout the day looking for drinks. Gurobean is open for business 24 hours/day, 5 days a week. Customers enter the shop and place orders for either hot coffee or cold coffee; you can see their preferences in the thought bubbles above their heads.
When customers arrive, they join the queue and wait to be served by the barista, who prepares drinks and serves customers one at a time. If customers arrive faster than the barista can serve them, the queue grows longer and waiting times increase; in some situations, customers may decide not to wait and leave without buying anything.
Behind the counter is the coffee station, where drinks are prepared. Your decisions about how much coffee to brew determine whether drinks are available when customers arrive. If demand exceeds the available supply, some customers may leave without being served; if too many drinks are prepared, unused coffee becomes waste.
The system evolves continuously as customers arrive, wait, and are served. As you adjust the operational decisions of the coffee shop, you will see the effects play out in real time.

The Gurobean screen. Along the top are game controls, the day, and your score; the board on the upper right holds the sound, help, newsfeed, tips, and round markers. The dashboard shows your live metrics and the Constraint and Profit monitors; the BREWROBI station sits behind the counter; and the slider panel (lower right) is where you set your decisions.
Gameplay
Your job is to run the Gurobean coffee shop by making operational decisions to optimize how the system performs. You control these decisions using the slider panel at the bottom of the screen.
Making your decisions: the slider panel
Each slider represents a decision variable that you control. Depending on the round of the game, these may include:
How many hot coffees to brew per hour,
How many cold coffees to brew per hour,
The markup built into the price of drinks,
How skilled the barista is (i.e., how many customers they can serve per hour, on average).

The BREWROBI station prepares hot ♨ and cold ❄ coffee. Your brewing sliders decide how much of each is ready when customers arrive each hour.
Trying a solution
Adjusting the sliders lets you specify a candidate solution, but it does not immediately change the behavior of the coffee shop. Until you click Try Solution, the system does not reflect the changes you’ve made in the slider panel; clicking the button restarts the simulation with your new choices.
Some slider combinations call for more ingredients than the shop has on hand (the beans or water available). When this happens, the slider values turn red and the panel shows INFEASIBLE. Adjust the sliders until the decision is feasible again before running the simulation.


Feasible (top, green) vs. infeasible (bottom, red). Red values mean a constraint is broken; the player must adjust until the panel reads feasible. Use Try Solution to run the simulation and Submit Solution to lock in your decisions.
Watching the simulation
Once the simulation starts, the coffee shop begins operating in real time: customers arrive randomly, join the queue, and are served by the barista, and the system evolves continuously as these events occur. Because arrivals and drink preferences are random, the behavior of the system changes each time the simulation runs.
Unlike the Burrito Optimization Game, where outcomes are calculated immediately, Gurobean models a dynamic system that evolves over time, so you need to let it run before the results become meaningful. A reliable read takes a good stretch of simulated time, not just a moment. When a simulation first begins, the shop starts empty (no customers in line and no drinks being served), and during these first moments the system is still “warming up” as customers begin arriving and the queue forms.


Warm-up vs. steady state. The shop opens empty (top) and the early metrics are unstable; once customers fill the queue (bottom), the numbers settle into representative behavior.
During the early period the performance metrics may fluctuate or appear unstable. This is expected. As the simulation continues, the system gradually settles into its typical operating behavior and the metrics become more representative of how the shop would perform over the long run, so it’s worth letting it run for a good stretch of simulated time before judging your decisions. In real-world operations research, simulations are used the same way to analyze complex systems such as call centers, hospitals, and transportation networks.
Monitoring performance
Two dashboards help you understand how your decisions affect the system.
Constraint Monitor
The Constraint Monitor shows whether your brewing decisions fit within the shop’s available resources: the beans and water on hand for hot and cold coffee. If a decision needs more than the shop has, the game marks the solution infeasible and the sliders turn red. The exact graph may change from round to round as new resource constraints are introduced.
Profit Monitor
The Profit Monitor shows how your operational decisions affect profit. As you move the sliders, the graph updates to show how profit changes as a function of your decisions, helping you see the trade-offs and guiding you toward better choices. Small toggles above the graph let you switch the view between hot coffee, cold coffee, and price, so you can focus on one relationship at a time. As later rounds add decision variables, nonlinear relationships, and simulation-based performance, the Profit Monitor changes to reflect the new complexity.

The Profit Monitor (here in an early round): profit rises with the number of hot coffees brewed, peaks, and then falls. Notice that the current choice (teal dot, ~25 cups) sits past the peak; brewing less would actually earn more.
Experimenting with decisions
One of the best ways to improve your strategy is to experiment. Try adjusting the sliders and observe how the system responds: how the queue changes, how profit evolves, and how close your decisions are to the operational limits. Optimization problems often involve balancing several competing effects, and exploring different solutions helps you understand the system.
Finishing a Round
Once you are satisfied with your decisions, click Submit Solution to submit your solution for the round.
NOTE: Until you click Submit Solution, you are still only trying things out; your result for the round is finalized once you submit.
When you click Submit Solution, the game records the current values of your decision sliders (your strategy for running the shop under that round’s conditions) and scores them by running a full 120-hour simulation, five days of business, which produces your simulated 5-day profit. Gurobi then solves the round in real time and compares its optimal decisions against yours.
What is Gurobi optimizing?
Understanding what this comparison represents is important. Behind the scenes, each round defines a mathematical optimization problem that specifies:
A set of decision variables (chosen by the player),
An objective (what we want to maximize or minimize),
And constraints that limit which decisions are allowed.
Gurobi solves this problem to find the decision that optimizes the objective in expectation, the decision that performs best on average across all possible realizations of uncertainty. Because Gurobean models a stochastic, dynamic system, the optimizer is not trying to predict exactly what will happen in any one simulation run; it is choosing decisions that are statistically best over many possible futures. This is why your solution may outperform Gurobi’s in a single run, even though Gurobi’s remains optimal in expected performance across many runs.
The comparison screen is not asking “Who got lucky this time?” It is asking “Which decision would you trust before knowing what randomness will occur?” This distinction between expected performance and realized outcomes is central to decision-making under uncertainty.

The comparison screen (here, Round 7). You see your decision settings, Gurobi’s optimized settings, and the resulting metrics. On this particular five-day run the player’s solution earned more than Gurobi’s, yet Gurobi’s stays optimal in expectation, because each run is just one realization of a random system.

The screen also plots each solution on the expected-profit curve. Filled markers show expected profit; hollow markers show what actually happened in the simulated run, so you can see both where a decision sits in theory and how one random run played out. You want your solution as high on the curve as possible.
After reviewing the results, you can proceed to the next round, where new operational features and decision variables are introduced.
Days and Rounds
The game is organized into eight rounds of increasing complexity. Early rounds involve just a few decisions and let you build intuition; later rounds add new decision variables (such as pricing and service speed) and new effects (queue congestion, customer loss, and nonlinear profit). Each round introduces a new wrinkle, and the shop’s built-in guide, Alinea, explains what has changed and what to watch.

Alinea surfaces hints throughout play. Whenever you make a change or conditions shift, an exclamation (!) appears on screen; opening it reveals a contextual tip, and at the start of each round she explains the new wrinkle.
Customers arrive at random, following a Poisson process, and each independently wants hot or cold coffee, so the hourly demand for each drink type is itself random. Your decisions are therefore judged on how the shop actually performs in simulation, not on a single guaranteed number. As the rounds progress, this is exactly why letting the simulation run and thinking in terms of expected performance become so important.
Championship mode
Championship mode lets you compete against others while playing Gurobean. There are two kinds, both reached from the Championship screen: enter a match code to join a private Class Championship, or tap Enter Weekly Match to join the public, worldwide competition.

The Championship screen. Entering a match code joins a private Class Championship; “Enter Weekly Match” joins the global, weekly competition. You also choose a display name before joining.
Class Championship
Designed for classes, conferences, or other events, a Class Championship is a private competition on a shared scenario. The organizer shares a match code; you enter it along with a display name, then play the game as usual. At the end, the top players are ranked. (Only use Championship mode if you were instructed to do so; if you’re playing on your own, just click Play the Game.)
Global Championship
The Global Championship is a public, worldwide competition. Join it with the Enter Weekly Match button, no match code needed, after choosing a display name. A new global match runs each week with a fresh scenario, so you can come back for a new challenge on a regular cadence and see how you stack up against players around the world.
How Gurobi finds the optimum
For curious players: Why simulation is necessary
In early rounds, it may be possible to reason about good decisions using simple intuition or by inspecting the graphs. As the game progresses, this becomes much harder. When pricing, congestion, customer behavior, and capacity interact, the system becomes nonlinear and path-dependent: small timing differences can change queue lengths, customer loss, and profit in ways that are difficult to predict analytically.
In such systems, closed-form performance formulas are often unavailable. Instead, simulation is used to estimate outcomes empirically by observing how the system behaves over time, reflecting how real operational systems (call centers, hospitals, transportation networks) are analyzed in practice, where uncertainty and feedback make purely analytical solutions impractical.
Is Gurobi trying every option?
No! Checking every possible decision, an approach called enumeration, sounds reasonable, but it is hopeless here. Even if a computer could evaluate a billion candidate policies per second, discretizing just a handful of sliders into a few dozen settings each produces combinations that climb into the trillions within a few rounds. Worse, because Gurobean is stochastic, each candidate would have to be simulated many times to estimate its expected performance, not merely evaluated once. Brute force runs out of time almost immediately, which is why we need a real optimizer.
What the optimizer is doing?
When we built the game, we also formulated the optimization problem the player faces in each round: choose the slider settings (the decision variables) that maximize expected profit (the objective), subject to the shop’s resource and capacity limits (the constraints). Gurobi takes that model and uses mathematics and algorithms to find the decision that is best in expectation, quickly, and far more cleverly than brute force. In fact it solves each round in a fraction of a second, as the solve time shown on the comparison screen makes clear.
Gurobean’s model is harder than the Burrito game’s in two ways. It is nonlinear: pricing, congestion, and customer behavior feed back on one another, so profit bends rather than adding up in a straight line. And it is stochastic: performance is an expectation over many random futures, estimated through simulation. These features place Gurobean in the world of nonlinear and stochastic optimization, drawing on ideas from the newsvendor inventory problem and queueing theory, areas central to operations research.
The optimization model
The model uses the following quantities.
Arrivals and service: λ is the customer arrival rate (customers per hour). An arriving customer wants hot or cold coffee with probability ψ_h or ψ_c, so the hot and cold arrival rates are λ_h = λψ_h and λ_c = λψ_c. The barista serves at rate μ (customers per hour).
Costs and revenues: r_h, r_c are the revenue per cup of hot/cold coffee sold; c_h, c_c the cost per cup brewed; and m the markup (assumed the same for both types), so the price is cost plus markup.
Resources: a_b and a_w are the beans and water available; u_hb, u_hw (and u_cb, u_cw) are the beans and water needed per cup of hot (and cold) coffee.
Decisions: the player and Gurobi choose Q_h and Q_c, the cups of hot and cold coffee brewed per hour, and, in later rounds, the markup m and the service rate μ.
Random demand: D_h and D_c are the random hourly demands for hot and cold coffee. The queueing logic makes each one Poisson with mean λ_i; for the optimization it is approximated by a Normal distribution with the same mean and variance.
The objective: a newsvendor problem
Each round’s objective is built on the classic newsvendor problem: you commit to how much to brew before you know demand, and you can lose either way: brew too much and cups go to waste, brew too little and you miss sales. For each coffee type, the expected profit is

where (Qᵢ − Dᵢ)⁺ = max{0, Qᵢ − Dᵢ} is the number of unsold cups. Because demand is Poisson, approximated by a Normal with mean and variance λᵢ, this expectation has a closed form:

Here φ and Φ are the standard normal density and cumulative distribution, and zᵢ = (Qᵢ − λᵢ) / √λᵢ. The overall objective simply adds the two coffee types:

The base model
In the early rounds, the model maximizes expected profit subject to the beans and water on hand:

(With a single coffee type, the unused terms are dropped. The objective is nonlinear. In the first few rounds, it is strictly increasing, meaning the more coffee you brew, the higher your profit. In later rounds, it's no longer optimal to brew as much as possible.)
How the model grows across rounds
Later rounds keep the same structure but add new decisions and effects:
Rounds 1–2: brewing quantities only, with no brewing cost: hot coffee in Round 1, then both hot and cold in Round 2.
Rounds 3–4: a per-cup brewing cost is added (hot, then both), so over-brewing now visibly wastes money.
Round 5: the markup m becomes a decision variable. Raising it lifts the price but drives customers away, because the arrival rate now depends on it (below).
Round 6: balking. When the shop is crowded, an arriving customer may give up and leave rather than wait, and the chance of balking grows with the queue.
Round 7: bigger orders. Each customer may order several cups, scaling the effective demand.
Round 8: the service rate μ becomes a decision variable. A more skilled barista clears the queue faster but costs more per hour (below), and the objective now subtracts that barista cost.

Round 5: the arrival rate λ(m) falls as the markup m rises: higher prices, fewer customers.

Round 8: the barista cost B(μ) rises with the service rate μ: faster service, higher wages.
Is it only for coffee?
Not at all. Optimization and simulation are used together throughout the real world: service operations, pricing decisions, staffing and capacity planning, inventory management, supply chains, healthcare, energy, and transportation, among many others. What these have in common with Gurobean is that decisions must be made before uncertainty is revealed, the systems behave nonlinearly, and performance is best understood by simulating many possible futures.
As you may have felt while playing, solving such problems by hand works only for the smallest cases; as the system grows and the inputs become uncertain, a general-purpose optimizer becomes essential. Once you can model a problem, you can optimize it, and update it easily as conditions change.
What you've learned by playing Gurobean
Although Gurobean is presented as a game, it is designed to reflect real challenges in operational decision-making. By playing, you have experienced that:
Feasibility is necessary, but not sufficient.
Randomness makes individual outcomes unpredictable.
Nonlinear systems do not respond predictably to small changes.
Simulation is essential when systems evolve over time.
Optimization focuses on expected performance, not perfect prediction.
These challenges arise in many real-world settings, including service operations, pricing decisions, capacity planning, and supply chains. Gurobean’s goal is not to replace mathematical modeling, but to help players build intuition for why optimization and simulation must work together in complex, uncertain systems.
Further reading
The newsvendor problem: a foundational inventory model for deciding how much to stock under random demand.
Queueing theory: the mathematics of waiting lines, arrivals, balking, and service.
Stochastic and nonlinear optimization: choosing decisions that are best in expectation when outcomes are uncertain and relationships are nonlinear.
Gurobi Optimizer Reference Manual: modeling structures, features, and the full API reference.
Gurobi Knowledge Base: how-to articles, troubleshooting, and a community forum.
Gurobi modeling examples: Jupyter notebooks that build optimization models step by step in Python.
Free Gurobi academic license: full-featured access for students, faculty, and researchers.
Who built this?
The Gurobean Optimization Game was created by:
Gurobi Optimization, in collaboration with Prof. Larry Snyder of Lehigh University.


