Machine Learning News Hubb
Advertisement Banner
  • Home
  • Machine Learning
  • Artificial Intelligence
  • Big Data
  • Deep Learning
  • Edge AI
  • Neural Network
  • Contact Us
  • Home
  • Machine Learning
  • Artificial Intelligence
  • Big Data
  • Deep Learning
  • Edge AI
  • Neural Network
  • Contact Us
Machine Learning News Hubb
No Result
View All Result
Home Artificial Intelligence

The Game Theory of Queuing in a Supermarket | by LeAnne Chan | Aug, 2022

admin by admin
September 9, 2022
in Artificial Intelligence


How do we minimize our time spent queueing? Game theory and decision making in our everyday life.

One day over lunch, my colleague was telling us how he had made a reservation for popular hotpot restaurant Hai Di Lao, which got me thinking about how we make decisions when queueing.

“Funny thing, it’s not actually a reservation for a table, it’s just a reservation for a priority queue.”

“Oh, just like the express lanes in Disneyland!”

“…but what if everyone made a reservation for the priority queue; then wouldn’t the normal queue be faster?”

Photo by Lisanto 李奕良 on Unsplash

Some colleagues said that there was a system where the priority queue would move faster than the normal queue. But we eventually concluded that there would always be some length at which it made more sense to go to the normal queue even if you had a priority reservation.

Then someone said something we all agreed on:

“If there’s a group of us, just split up and queue in both queues.”

“Such a classic Singaporean kiasu* move, I wonder if people in other countries do this.”

*kiasu: scared to lose out (Singlish)

“It’s just game theory, queuing in both queues is a Nash equilibrium for society.”

“And the guy queueing behind you can’t be mad if you left his queue to join the other!”

Game theory is a field of mathematics that helps us understand decision making in a system of different players.

A Nash equilibrium is a set of strategies for each player where no player has any incentive to change their strategy, even after knowing the strategy of other players. (Named after mathematician John Nash).

In economic terms of optimality, a Nash equilibrium is an optimal state, where each player makes optimal moves while considering other player’s optimal strategies.

Let’s consider a generic queuing system, for example at the supermarket checkout. There are 2 queues offering the exact same service, and 2 types of players (shoppers) — (1) those in groups, and (2) single shoppers.

We will reasonably assume that each shopper wants to check out as fast as possible, i.e. less time queueing = higher pay-off.

In our world we assume ‘irrational’ shoppers, who value quality time queuing with their friends over a faster checkout, do not exist. Therefore everyone in this world simply wants to minimise their time queueing, and there is no cost to any other action.

We will also assume that there is some uncertainty in how fast each queue moves, since this depends on a few variables such as the cashier’s speed and how long each person ahead of you takes. There is a chance that a queue with more people in it could actually be faster, but this cannot be known a priori.

P.s. If there was no uncertainty, then the shorter queue would always be the optimal choice for all shoppers!

Photo by Donald Giannatti on Unsplash

I’ll suggest that …

A Nash equilibrium in this system is one where
(1) Group shoppers split themselves up into both queues and
(2) Single shoppers *should* choose a queue at random.

(1) Group shoppers split themselves up into both queues

Regardless of how long either queue is, it is best for group shoppers to diversify their risk and split up. This is because of our assumption of ‘rationality’ and thus there is no cost in splitting up. Since there is uncertainty in the speed at which a queue moves, it is best to split up and queue in both.

In fact, in addition to being a Nash equilibrium, this is also a dominant strategy, because regardless of what all other shoppers (groups or singles) decide to do it is still optimal to split up.

For the sake of discussion, what if there were some cost to splitting? Choosing the shortest queue would be better if the other queue was disproportionately longer, so that the cost of splitting would outweigh the likelihood that the much longer queue moved faster.

But could a scenario exist where one queue is disproportionately longer? Since group shoppers split up and queue in both queue, it would be single shoppers that affect the length of a queue. Would single shoppers keep choosing a queue that was longer, resulting in one queue becoming disproportionately longer?

(2) Single shoppers *should* choose a queue at random

A single shopper has to choose between either queue. Group shoppers will always split up regardless of strategy taken by the single shopper. Therefore in terms of a Nash equilibrium, we just need to find a strategy for the single shopper in which they have no incentive to change to another strategy.

A shorter queue is not necessarily the better choice because of the following uncertain variables:

  • efficiency of cashier
  • number of items each shopper in front of you has
  • number of groups in front of you (chance that they will jump to the other queue).

Perhaps if one

  1. collected enough information about each cashier through observing them over a period of time,
  2. refined a method of estimating how much time a shopper would take based on the size of their cart,
  3. and mapped out a Markov Chain of different scenarios of group shoppers…

one could be able to determine which queue was more likely to move faster (i.e. higher expected pay-off).

Realistically, we will not know which queue moves faster in that instance. Even if there was a queue that moved faster than the other more times than not, this probability would not be known to us, nor would we have the mental capacity / time to calculate this in the middle of a supermarket.

Therefore without knowing the actual probabilities of the queues, one can maximise their expected pay-off by choosing a queue at random (i.e. flipping a fair coin). In game theory, this is also known as a mixed strategy.

Calculating the expected pay-off from choosing a queue at random Let’s say there is some probability p that queue A moves faster than queue B, but p is not known.If we choose the queue that moves faster, the pay-off is 1. If no, the pay-off is 0. The expected pay-off from selecting queue A is p, whilst the expected pay-off from selecting queue B is 1-p. Expected pay-off from selecting queue A: p
Expected pay-off from selecting queue B: 1-p
Without knowing what p is, we cannot make a decisive choice whether queue A or B is better. Obviously if p >0.5, queue A is better, if not, queue B is better.By giving both queue A and queue B a 50-50 chance of being selected, our expected pay-off would be: probability of selecting A and A being faster + probability of selecting B and B being faster = (0.5) * (p) + (0.5) * (1-p) = 0.5 * (p + (1-p)) = 0.5 * (1) = 0.5Regardless of the probability distribution p, randomising will always give us an expected pay-off of 0.5.

Regardless of the probability of one queue moving faster than the other, the expected payoff of a 50–50 random choice will always be 0.5, and thus would be the most optimal choice given the uncertainty. This is a Nash equilibrium since no matter how group shoppers decide, there would be no incentive to change strategy.

P.s. since each single shopper is also choosing a queue at random, an equal number of single shoppers are expected to join each queue, reinforcing our earlier argument that a disproportionately longer queue would not exist!

In “Thinking Fast and Slow”, Daniel Kahneman describes the 2 systems of our brain that we use in decision making. System 1 makes fast and quick decisions, reacting quickly. The decision making is subconscious and we often don’t even realise we are making a decision (e.g. swerving to avoid a fallen tree branch). System 2 is used for slower and deeper thinking (e.g. solving an algebra problem).

Photo by Mukul Joshi on Unsplash

Even if it would maximise expected payoff, would shoppers start tossing coins at the supermarket check-out, or even think to randomise? It is more likely for shoppers to be using System 1 to make a quick decision, since we all want to get on with our lives without too much effort.

Without putting too much thought into it, most would simply choose the shortest queue. This is because over time we have come to believe, correctly or incorrectly, that shorter queues move faster.

In the grand scheme of things, we are probably better off not overthinking simple decisions and let system 1 take the lead…

But knowing what you know now, would you toss a coin the next time you’re at a supermarket check-out?



Source link

Previous Post

How AI is Transforming the Job Market | by Naren Gangavarapu | Sep, 2022

Next Post

Natural Language Processing 101. We have all been in English class and… | by Aryan Khimani | Sep, 2022

Next Post

Natural Language Processing 101. We have all been in English class and… | by Aryan Khimani | Sep, 2022

Learning Kubernetes, the Easy Way | by Percy Bolmér | Sep, 2022

AI Athletics Performance Analyzer | by J.A.Bond | Sep, 2022

Related Post

Artificial Intelligence

Exploring TensorFlow Model Prediction Issues | by Adam Brownell | Feb, 2023

by admin
February 2, 2023
Machine Learning

Different Loss Functions used in Regression | by Iqra Bismi | Feb, 2023

by admin
February 2, 2023
Machine Learning

How to organize bills? – 3 ways to track bills

by admin
February 2, 2023
Artificial Intelligence

How to decide between Amazon Rekognition image and video API for video moderation

by admin
February 2, 2023
Artificial Intelligence

The Future of AI: GPT-3 vs GPT-4: A Comparative Analysis | by Mohd Saqib | Jan, 2023

by admin
February 2, 2023
Deep Learning

6 Ways To Streamline Tech Hiring With A Recruitment Automation Platform

by admin
February 2, 2023

© 2023 Machine Learning News Hubb All rights reserved.

Use of these names, logos, and brands does not imply endorsement unless specified. By using this site, you agree to the Privacy Policy and Terms & Conditions.

Navigate Site

  • Home
  • Machine Learning
  • Artificial Intelligence
  • Big Data
  • Deep Learning
  • Edge AI
  • Neural Network
  • Contact Us

Newsletter Sign Up.

No Result
View All Result
  • Home
  • Machine Learning
  • Artificial Intelligence
  • Big Data
  • Deep Learning
  • Edge AI
  • Neural Network
  • Contact Us

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.