Home / Faculty Club / Best Lessons / Bring Logic to Life with a Strategic Card Game

Bring Logic to Life with a Strategic Card Game

This professor found a winning trick for easing students into mathematical models of modal logic. And it starts with an ordinary deck of cards.


Adam Bjorndahl, PhD

Assistant Professor of Philosophy, Carnegie Mellon University, Pittsburgh, PA

PhD in Mathematics, MS in Mathematics and in Computer Science, BS in Mathematics and Philosophy

For many students—and anyone else, for that matter—the concept of applying mathematical theory to philosophy can seem counterintuitive, if not impossible. But this is the world where Dr. Adam Bjorndahl, assistant professor of logic and game theory, thrives. And it is where he wants his students to find it possible to thrive, too.

One of Bjorndahl’s courses at Carnegie Mellon University focuses on modal logic. As he explains it, this is the study of reasoning about concepts that resist a simple logical decomposition, such as whether an agent knows or believes something (epistemic logic), whether something is guaranteed to or might happen in the future (temporal logic), what would be the case if some other thing were to happen (counterfactual logic), etc.

Today, modal logic is playing an increasingly important role in computer science, and it has possible application in many other areas as well: ethics (reasoning about what is obligatory vs. permitted), program verification (reasoning about which outcomes are guaranteed vs. possible), economics and game theory (reasoning about what players know and consider possible, and what they know about what their opponents know), and so on. The growing interest in the subject has resulted in an influx of non-CS students into Bjorndahl’s courses, which has made it necessary that he reconsider how he teaches the course.


Mathematical models can feel like “abstract nonsense”

There are two standard approaches to teaching a class on modal logic: philosophical and mathematical, says Bjorndahl. “The basic challenge [of this course] is to introduce students to a certain collection of logical models—called ‘possible worlds semantics’ models—that most of them will be quite unfamiliar with,” he explains. “These models are designed to support (among other things) reasoning about what an agent knows, what they know about what other agents know, and how they update their knowledge based on new information as they acquire it. These [philosophical] concepts are pretty intuitive to most people, but the mathematical representation of them is not obvious at all.”

He found that, for students who “have not already bought into the basic math schtick” to be engaged in class, he had to help them become comfortable with the models. “Until you can have an intuition for [the models], it can all seem like a big pile of abstract nonsense that you have to memorize—seemingly removed from one’s actual concerns,” he says.

So how do you go from “it is necessary” to teach these models to “it is possible” to do so? For Bjorndahl, the answer was in the cards.


Use a card game to show how math models play out

Bjorndahl happened upon a logical solution to his conundrum by posing this question: If modal logic plays a crucial role in game theory, why not use gaming to teach modal logic?

The card game that Bjorndahl introduced to do that is called Aces and Eights, which he learned from Joseph Halpern, an advisor when he was a student. He has now programmed it into his classroom instruction—right from the first day of the course. Its application relates to one lesson in particular that explores the aforementioned “possible worlds semantics” models.

The idea is that, while students are playing, they must think about what the other players in the group see, what they know, what they can infer, and so on. And this real-world play provides a concrete and relatable example of the kind of reasoning that is captured by modal logic.

“It opens up the way to study topics in logic and mathematics, using interactive activities that are tailored to exhibit or highlight the use of those logics,” he says. “Fundamentally, all of mathematics is developing tools to enhance our reasoning. It’s not just our abstract reasoning about nothing—it’s concrete.”

By focusing on making the concepts real first, he is then able to layer on the mathematical representation in a way his students can grasp. “With mathematics, you can’t often see the connection to the real world,” he adds, “but in presenting it this way, it gives students a more grounded approach [that they can use in real life].”


“The focus of the class—and my driving motivation—is not just to develop technical stuff, but to be able to reason about real-world situations and problems.”

— Adam Bjorndahl, PhD

Course: 80-315 Modal Logic: Choices, Decisions, and Games

Frequency: Two 80-minute class meetings per week

Class size: 10–20 students

Course description: This course is an introduction to mathematical modal logic and its applications in philosophy, computer science, linguistics, and economics. We begin with a rigorous development of propositional modal logic: the basic language, interpretation in relational structures, axiom systems, proofs, and validity. We prove soundness and completeness of various systems using the canonical model method, study model equivalences and expressivity results, establish the finite model property, and discuss decidability and basic complexity results. We also consider topological semantics as an alternative to relational semantics, and investigate the connection between the two. Finally, we introduce modal predicate logic, incorporating first-order quantification into the system. In the latter part of the course we turn our attention to more specialized logical systems and their applications, as determined by the interests of the class. Topics may include: epistemic and doxastic logics, multi-agent systems and the notion of common knowledge (with applications to game theory), deontic logics, logics for reasoning about counterfactuals, temporal and dynamic logics, public announcement logic, justification logic, and others.

See resources shared by Adam Bjorndahl, PhD

See materials

Lesson: The modal logic of Aces and Eights

Aces and Eights is a card game that is played with the backs of the cards facing the person holding them. If you were to play the game, you would not know what cards are in your own hand to start, but you would know what cards your opponents have. The object of the game is to figure out which cards you are holding.

This game involves three players and only eight cards: four aces and four eights. Bjorndahl divides the class into groups to begin. Each player is dealt two cards; the other two cards are hidden. During your turn, you try to guess which cards you are holding based on the cards held by your opponents; if you do not know, you pass. It seems easy, as the suit does not matter—you are either holding a pair of eights or aces, or one of each card.

If you guess wrong, the play continues; if you guess right, you win and the game is over. But right or wrong, Bjorndahl says, players’ answers open up opportunities for discussion, as they try to explain where their reasoning went astray or how they figured out the correct conclusion.

Note: Though the game is called Aces and Eights, Bjorndahl does not bring a large number of decks of cards to class. Instead, he pre-sorts the cards into groups, so some students get aces and eights, but others get kings and sevens, or queens and nines. The rules are otherwise the same.

“At first glance, the game seems remarkably simple,” Bjorndahl says, “but it requires a lot of careful thinking about what the other players in the group see, what they know, what they can infer, and what they do not know.”

How does Bjorndahl introduce the game and then integrate it into his larger lesson? Here are the steps he follows.

Introduce the game ASAP

Bjorndahl introduces Aces and Eights almost as an icebreaker in the very first class. After spending a few minutes on introductions and going over the syllabus, the class dives right into the game.

While the primary goal of the game is to demonstrate “possible worlds semantics,” there is also a secondary goal: Bjorndahl has found that jumping into a hands-on activity is a great way to engage students who are otherwise uncertain about the topic. This can help with retention, since engaged students are more likely to stay enrolled.

Let the game play itself out

Bjorndahl usually lets his students play for anywhere from 20 to 40 minutes. (He posts the rules on the wall, using a slide projector, so students can refer to them throughout the game.) While they are playing, he will walk around and listen in to hear what students are talking about or to find out whether they are discussing their reasoning. “Sometimes I prompt the discussions, or I join in—without giving too much away!” Bjorndahl says.

“In playing this game repeatedly with their peers, they start to get a feel for it, and a feel for the deep reasoning processes involved,” he continues. “So by the time we come back together as a class, they’ve all had some fun and have some idea of how to play this rather challenging game.”

About 20 minutes in, he will interrupt the class to ask whether they want to continue playing or wrap up and move to the next step. “I let it go on however long it needs to go,” he says. “When the game playing is over, we come back together as a class and discuss.”

Engage in post-game analysis

After the playing is over, students have a chance to give a post-game analysis about their strategies and what they found effective.

“I start soliciting from them what strategies they were using during the times that they won,” Bjorndahl says. “I call ‘0-level cases’ when you win right away (which is rare, and generally a matter of luck). We talk about if there are any other ways to win that aren’t so trivial—we talk about prefabricated scenarios and collectively reason together through some such scenarios. For example, students usually figure out that if they’re playing third, and the first two players pass, that means neither of them got ‘lucky,’ and that can give the third player some information they wouldn’t otherwise have just from looking at the visible cards. And as we discuss the games, we get a sense of how hard it is to keep track of (i.e., ‘model’) other players’ knowledge and inferences.”

These conversations open students’ minds to the concepts that are to come in the class.

And then there is the big reveal.

Blow their minds about the game

Bjorndahl has created a mathematical model—a big color-coded “network diagram” with 17 notes—that showcases all the ways to win the game.

“This is the finale,” Bjorndahl says. “I explain how we can use that picture to fully analyze every aspect of the game. [The diagram] shows them answers to any question we might ask about how to play the game. Can someone always win? How long will [one round of game play] go on? Then, I explain that this picture is an example of exactly the type of ‘possible worlds semantics’ models that are at the core of this class—exactly the type of abstract mathematical models we’re going to be studying and using. So they get a feel, right from the beginning, for why these abstract models are actually useful for understanding the world, how they hook up with real-world questions and challenges.”


“Measuring [outcomes] is obviously hard,” says Bjorndahl. However, he says that by starting the class in this way, he sets the tone that they will be working with mathematical models in a fully sophisticated but engaging way. He also believes this leads to a higher retention rate of non-math majors. Particularly because the very first class is based on discussion (“unusual for a mathy class,” he notes), he believes class participation remains higher throughout the semester.

Student feedback

Bjorndahl has received a lot of positive feedback from students. On an anonymous evaluation form, students said that he did a good job in making this kind of material accessible to a broader audience.

“I appreciated Bjorndahl’s teaching style and drive to improve the class. He consistently asks students for feedback and is enthusiastic about making the class better. He also makes the course accessible to all students—including those without technical knowledge. Also love his entire quiz/test/homework set-up. Great professor!”

“Honestly the best course I’ve taken at CMU. Every aspect of the course design was spot-on, the lectures were fascinating, and the homeworks interesting and challenging. 11/10 would recommend.”

“This was one of my favorite math-y courses that I have taken at CMU. Lecture was easy to follow because of numerous examples both before and after formal definitions. All concepts were explained as clearly as I can imagine anyone explaining them. At a university where mathematical ideas are often thrown at me at blinding speed and intuition is never developed in class, this was a welcome surprise. I also really appreciated how open Professor Bjorndahl was to questions about the course material and students’ opinions about the flow of the course. I definitely felt that if I wanted him to modify his teaching, then I could ask him to do so.”

Leave a reply

Have you tried this in any classes you teach? Would you like to try it? Share your questions, critiques, comments, and insights below.

What Is Course Hero?

Course Hero is an online learning platform where you can access course-specific study resources contributed by a community of students and educators.

What Is the Faculty Club?

The Faculty Club is a multi-disciplinary community of educators sharing ideas to advance innovation and celebrate excellence in higher education.