Prodigy is the brainchild of Rohan Mahimker and co-founder Alex Peters, both 30 years old. As a kid, Mahimker was obsessed with Pokémon, the hit video game series where players battle each other with collectible monsters. His mother, meanwhile, wanted him to spend his free time at Kumon, an after-school math and reading program. Later, as a student at the University of Waterloo in Ontario, Mahimker had an idea: What if you could combine the two? In 2011, Mahimker and his classmate Peters created Prodigy Game and set about turning that inspiration into a business.

Prodigy Game isn’t the only company that has found success using screens to lure kids into learning. The “edutainment” space is booming. A 2016 study by the market research firm Ambient Insight found that between 2010 and 2015, the number of teachers using computer games in the classroom more than doubled, with global game-based learning revenues expected to climb from $2.6 billion in 2016 to more than $7 billion by 2021.

One reason the field is growing so fast is that the technology now exists to make the software both effective and actually fun. This isn’t Oregon Trail — Prodigy uses an algorithm to figure out which math questions to pose for users in their spell-casting battles. The company is currently hiring more engineers with experience in A.I. and machine learning to further refine its algorithm.

“We have to make sure we’re not consistently putting them in a position where they’re always learning, because they’ll get mental burnout,” says Steve Bergen, director of product at Prodigy Game. In other words, kids should be challenged, but not to the point of frustration. The more users play the game, the more data its algorithm has and the more effective its predictions.

The ultimate reason for Prodigy’s explosive growth is that kids don’t just tolerate it under the watchful eye of a teacher—they voluntarily log on to play after school as well. “We consider games like Fortnite our direct competitors,” Bergen says. “As soon as they get home, that’s when we have our true competition.”

Prodigy’s sole revenue stream is nudging kids to upgrade to a paid membership, a status that gives them access to outfits, hats, and little creatures that will follow them around.

To sweeten the pot, Prodigy gives parents and teachers elaborate control panels to monitor kids’ progress and adjust goals and rewards. And because Prodigy Game distributes its software on a freemium basis, teachers can incorporate it into their curriculum without having to go to the school board to ask for money.

While crucial for Prodigy’s rapid uptake, that model has engendered sharp criticism. The game’s sole revenue stream is nudging kids to upgrade to a paid membership, a status that gives them access to outfits, hats, and little creatures that will follow them around.

“The whole issue of having ads in a program like this is extremely troubling, and I think that viewing ads should not be a part of the school day,” Golin says. “It really indoctrinates kids into that virtual junk economy. I don’t think we should be teaching kids that the reason to learn is so you can buy a virtual reward for a character that doesn’t even really exist.”

Bergen insists that in-game purchases have no effect on what’s really important — namely, learning math. “They don’t make you any stronger,” he says. “They just make you look, maybe, cooler. The education content is not locked.”

As with most such games, the ask is hidden inside the app, so parents don’t see the potential cost when they first agree to let their kids play. Teachers don’t see any kind of messaging about the paid content when viewing the Prodigy dashboard, Holand said.

Of course, many kids first encounter the game at school, without parental oversight. That strategy can backfire, as Facebook found out last month when it came under fire for encouraging kids to make in-app purchases without parental supervision. In pushing similarly profit-motivated freemium software in their classrooms, public schools could be seen as in contributing to the exploitation of their pupils by introducing a commercial element into education.

“If we believe that these programs are beneficial and essential to student learning, then we should pay for them,” Golin says, “not pay for them through children’s attention and forced consumption of advertising.”

But for kids, who are already well adapted to constant come-ons from purveyors of free software, a few more ads are barely enough to register on their consciousness. For my own seven-year-old, the main take-home seems to be that he likes it, and grown-ups will let him play it.

“The last math game you made me play was torture,” he tells me. “Prodigy is actually fun.”