research news

Can chess engines make better emergency room decisions?

A white toy ambulance sits on a chessboard surrounded by glass chess pieces.

Graphic by Carly Pinter/University at Buffalo

By TOM DINKI

Published January 27, 2023

Print
“It’s great to be able to use a hobby to actually make a difference in the world. ”
Adam DeHollander, operations research PhD student
Department of Industrial and Systems Engineering

Computer chess engines surpassed the world’s best human players in the 1990s. They can calculate millions of moves per second, allowing them to quickly make the best decision on the board. So why couldn’t they be used to make decisions in an emergency room?

A game-playing artificial intelligence focused on assigning nurses and prioritizing patients instead of sacrificing pawns and capturing queens is being developed by Adam DeHollander, an operations research PhD student in the Department of Industrial and Systems Engineering. 

“I wondered if we could reprogram the algorithms that play chess to instead analyze the emergency department,” DeHollander says. “Turns out you can basically convert the emergency department into a game and then use the algorithms to solve the game.”

This new chess engine could eventually help medical professionals create better strategies for their emergency rooms, or even make real-time queuing and assignment decisions for them.

The research, the subject of DeHollander’s doctoral dissertation, recently received the 2022 Chessable Research Award from chess education platform Chessable. The award is for undergraduate and graduate students conducting any university-level research topic related to chess. 

DeHollander, as the graduate student winner, will receive $1,000. He’ll also write Chessable blog posts about his research progress.

“Adam has an impressive knowledge of advanced chess gaming software that makes the original IBM Deep Blue look like a toy,” says Mark Karwan, SUNY Distinguished Teaching Professor Emeritus and DeHollander’s adviser. “Using this technology for the critical issue of emergency rooms will analyze countless questions regarding the large, complex decisions that are made in real time.”

Turning a chess board into an ER

Adam DeHollander sits at a table with a chess board in front of them.

Adam DeHollander has been a tournament chess player since middle school and is a former volunteer chess coach. Photo courtesy of Adam DeHollander

DeHollander got the idea for the game after a hernia sent him to an emergency room in his native Michigan two summers ago.

“I was shocked to see dozens of patients sitting on the floor because there were no chairs left in the waiting room,” he says. "Many of these patients were elderly and quite ill.”

Overcrowding in emergency rooms dates back to before the COVID-19 pandemic further burdened the health care system. A 2018 study found that over 90% of emergency departments in the U.S. regularly experience crowded conditions. This overcrowding can lead to adverse health outcomes and increased mortality rates.

There’s been a few recent studies applying real-time decision-making tools to emergency rooms, but DeHollander says ERs are just too complicated for the technology to process quickly enough. 

So DeHollander, a tournament chess player since middle school and former volunteer chess coach, wondered if a chess engine could get the job done. 

He started by simply converting a chess game into a virtual emergency room, turning chess language into medical terminology. The pieces on the board became resources like nurses and X-rays, while moves became decisions about allocating those resources.

Next, the chess engine needed a way to evaluate ER decisions. Some chess engines rate board moves on a scale of one to zero, based on which side it will help win the game. One means a forced win for white, while zero means a forced win for black. Most moves are rated somewhere in between.

DeHollander decided that a score of one would mean no patients waiting in the emergency room, while zero would mean an infinite number of patients waiting for an infinite amount of time. 

“The chess engine can look at each decision and figure out what the score would be if you made that decision,” DeHollander explains. 

Of course, simply discharging patients as quickly as possible is not the sole goal of an emergency room. For this reason, DeHollander’s game allows one to set a length-of-stay goal for each patient.

“Selecting a goal that is appropriate for that patient’s condition creates a more equitable decision-making process,” DeHollander says.

Accounting for unpredictability in the ER

Studies have also shown that strategies that work in one emergency room often don’t work for another.

That’s primarily due to the high level of uncertainty in emergency rooms. For example, there’s no way for medical personnel to know when a new patient will arrive or how many resources that patient will require. 

DeHollander says his chess engine accounts for this uncertainty by modeling the game between a decision-making human player and what he calls a virtual “random player.” 

Whereas the decision-making player, represented by white, makes decisions like which patient should be treated next, the random player, represented by black, makes moves that represent unpredictability, like a new patient arriving or a patient requiring more care than originally thought. 

“The decision-making player is trying to maximize their score, but the random player is just making random moves,” DeHollander says. “Yet it’s important for the decision-making player to anticipate these moves.”

Since existing chess engines use variants of the minimax algorithm – white tries to maximize the score while black tries to minimize – the creation of a random player meant DeHollander had to code his simulation from scratch. He used the high-level programming language C++, mostly on his own laptop, to craft the simulation.

He’s now developing the chess engine’s artificial intelligence, a process that will require computers in UB’s Center for Computational Research and may take two-and-a-half more years. 

“I have a plan of how I’m going to do it, but it takes a very long time to code,” says DeHollander, who is a second-year PhD student.

Eventually, a doctor or nurse will be able to play the chess game as the decision-making player, allowing them to test out strategies that could help in their real emergency room. The game could also serve as training for medical students preparing to one day lead an ER.

“That’s just like chess. Chess players come up with different strategies based on what the chess engines are saying,” DeHollander says.

The ultimate goal is for the chess engine to be used in real time. Medical personnel could input information about their current situation and make decisions based on the chess engine’s advice. And with some retooling, the chess engine could even be applied to other fields, like manufacturing. 

Yet health care is where DeHollander’s passion lies. Asthma medication weakened his immune system to the point where he missed many days of middle school, while frequent doctor’s appointments for migraines forced him to take online classes in high school. In addition, his mother has battled cancer, while his aunt passed away from cancer. 

“There’s been a lot of sickness in my family, and that’s why I want to make a difference in the health care field,” DeHollander says.

The fact that his current health care research involves chess is just a bonus.

 “It’s great to be able to use a hobby to actually make a difference in the world,” he says. “It really doesn’t even feel like work. It’s just fun and enjoyable.”

READER COMMENT

Very interesting work! Good luck with your PhD research. Your idea made me think: The chess analogy is somewhat like using a Google navigator while driving. It is indeed a man-machine system. Google knows the routes and traffic conditions, and directs you along the way; if you follow Google, it constantly keeps updating traffic conditions and could change routes if necessary. If you change from its suggested route, then it recalculates the parameters, and redirects you in another way.

You could think of a similar strategy in ER resource management. The AI system could calculate the parameters and suggest a resource allocation to the ER manager; if the manager follows, then subject to the random events occurring, the system could calculate the next steps; if the manager deviates, then it could perform like Google and change resource allocation strategies accordingly.

Ram Ramesh