menu Home chevron_right
SCIENCE

The Two Generals’ Problem

Tom Scott | November 9, 2025



Time to tell a story about idempotency, computer science, and the Night of the Multiple Orders. • Sponsored by Dashlane —try 30 days for free at: https://www.dashlane.com/tomscott

MORE BASICS: https://www.youtube.com/playlist?list=PL96C35uN7xGLLeET0dOWaKHkAlPsrkcha

Written with Sean Elliott https://twitter.com/SeanMElliott/
Directed by Tomek
Graphics by Mooviemakers https://www.mooviemakers.co.uk/
Audio mix by Haerther Productions https://haerther.net/

Thanks to Dashlane for sponsoring the video! If you’re techie enough to watch this video, you should be using a password manager. Get a 30-day free trial at https://dashlane.com/tomscott

🟥 MORE FROM TOM: https://www.tomscott.com/
(you can find contact details and social links there too)

📰 WEEKLY NEWSLETTER with good stuff from the rest of the internet: https://www.tomscott.com/newsletter/
❓ LATERAL, free weekly podcast: https://lateralcast.com/ https://youtube.com/lateralcast/
➕ TOM SCOTT PLUS: https://youtube.com/tomscottplus
👥 THE TECHNICAL DIFFICULTIES: https://youtube.com/techdif

Written by Tom Scott

Comments

This post currently has 45 comments.

  1. @buckee_Ac3

    November 9, 2025 at 7:03 am

    after hearing the two generals problem i came up with my own solution that potentially breaks the rules but it is a messenger sent from A to B talking about setting up a rendezvous point at a specific time general A will send a messenger there to wait for general B's messenger to then relay the message of when the armies will mobalize

  2. @anonymone453

    November 9, 2025 at 7:03 am

    If you're on acknowledgement messenger number 7, you can be reasonably sure the attack is going to go ahead. Both parties have agreed to the plan, both parties know the other has agreed to the plan.

  3. @logosking2848

    November 9, 2025 at 7:03 am

    2:23 I don't see what the problem is. A tells B. now B knows A sent a message. So B sends one back. Now A knows their message was received. Now A just needs to send a message and get one a response from B. Now A knows that B got the original message, and that B knows that A knows that B got the message, and vice versa

  4. @jonathanarthuritoaldisinag573

    November 9, 2025 at 7:03 am

    isn't this just a specific case of a more generalized class of problem pertaining the synchronization or orchestration in distributed system??

    Each kingdom could be treated as a node and each messenger could be treated as packet going through the network of computer—which also has the same characteristic of semi-deterministic— and there's no single authority which could override the authority or request of other individual kingdom which imply that this is a leaderless system

  5. @workofao

    November 9, 2025 at 7:03 am

    Idempotency fixes one part of the problem. Maybe the most essential part, but there is still the part of notifying the user of a successful request.

  6. @ewallt

    November 9, 2025 at 7:03 am

    You could have the two messages meet in the valley, so both could see that the other made it out of the valley without being killed, and report back if the other messenger made it.

  7. @Thundernoob98

    November 9, 2025 at 7:03 am

    What’s the point of apologizing for using a delivery service because they don’t pay their employees well? If you really cared you wouldn’t use it but you use it when you wanted food so there’s no point in not using it whenver

  8. @vinokanthvelu2660

    November 9, 2025 at 7:03 am

    Idempotency doesn’t really solve the two generals problem because there is no solution to it. The delivery apps don’t even have two generals problem. What idempotency solves is the deduplication of actions in a distributed system. Good video anyway!

  9. @fullovstars9447

    November 9, 2025 at 7:03 am

    What a load a rubbish. General A could array his forces for battle. Seeing that General B can array his forces for battle. General A can slowly advance and if General B doesn't advance then he stops – maybe retreating to the start line to make a point? General B should be able to ascertain what General A is waiting for them? To check general B can advance and seeing that General A also advances he can continue the advance watching that general A also advances – then the attack will happen?

  10. @TheReuben101

    November 9, 2025 at 7:03 am

    So the Solution is: general A keeps sending messengers every 10 minutes proposing a time unless they hear confirmation from general B. Therefore, when B sends a response he can get a confirmation if he hears nothing and not if another messenger comes. The time you wait to confirm is your allowed risk.

  11. @LunaMoon-e9r

    November 9, 2025 at 7:03 am

    5:55 That wasn't luck, that was smart thinking.
    Please stop giving credit to luck that luck doesn't deserve. Luck is getting a big head about this, and math and science are being ignored.

Comments are closed.




This area can contain widgets, menus, shortcodes and custom content. You can manage it from the Customizer, in the Second layer section.

 

 

 

  • play_circle_filled

    92.9 : The Torch

  • play_circle_filled

    AGGRO
    'Til Deaf Do Us Part...

  • play_circle_filled

    SLACK!
    The Music That Made Gen-X

  • play_circle_filled

    KUDZU
    The Northwoods' Alt-Country & Americana

  • play_circle_filled

    BOOZHOO
    Indigenous Radio

  • play_circle_filled

    THE FLOW
    The Northwoods' Hip Hop and R&B

play_arrow skip_previous skip_next volume_down
playlist_play