The event, organized by After School Activities Partnerships (ASAP), pitted the students against a mix of assistant district attorneys, detectives, and paralegals in an hour-long series of friendly, but competitive, matches.
"It's a great game for them to learn," said Williams, who partnered with ASAP for a similar tournament in January. "It helps them think strategically, and it helps them problem-solve."
ASAP's centerpiece initiative, the Philadelphia Youth Chess Challenge, has brought together more than 3,000 K-12 students in the city for regular chess tournaments and events since 2002.
In 1972, Williams told the students at the start of Tuesday's event, his father bought him his first chess set from a shop on 69th Street. Williams played for fun throughout his elementary and middle school years, and he continues to play today, often with his 10-year-old daughter.
When Williams finished talking, the games began. The second-floor room in the District Attorney's Office, at first filled with screams and shouts from the students, grew silent almost instantly. Other than the click of camera shutters, the ping of timers, and the light thud of pawns moving forward, the room looked and sounded like a library.
Several seasoned student competitors, including 17-year-old Kent Huang, were on hand. Huang, a senior at Carver High School of Engineering and Science and the captain of his chess team, finished with a perfect record in the most recent regular season.
Huang only picked up the game after he started high school. But once he started playing, he was a natural.
"It's all about calculation, and it's all about finding the right solution," said Huang, who will play on the chess team at Drexel University next year.
And there were a few younger Bobby Fischers, like Sanayha Feliciano, a 5-year-old kindergartner at Rudolph Blankenburg Elementary School.
"She's out here beating kids nearly two times her age," said Mikyeil El-Mekki, who runs the Paul Robeson Chess Club in West Philadelphia and is Feliciano's coach.
But the main attraction was the game between Dembele, a Tilden Middle School sixth grader, and Williams. The two did battle on a special legal-themed chess board: Palm-sized jurors stood in for pawns, bailiffs functioned as knights, and mini-lawyers with briefcases were the bishops. The board had a judge's bench at either end.
The game was close, but Williams ultimately eked out a victory.
"We didn't want to make it too easy on him," said Ben Cooper, ASAP's director of chess programs.
As soon as Dembele and Williams wrapped up their 20-minute game, Bobby Fishburn-Spivery, a sixth grader at Blankenburg, took his turn against the district attorney.
The two didn't get to finish their match, but Fishburn-Spivery thinks he knows how it would have ended.
"I would've beat him," he said. "Definitely."