Get the latest tech news

"AI" on a Calculator (2023)


Can AI run on a calculator? Machine learning and computer vision algorithms can certainly be run on a calculator albeit slowly: I ported a convolutional neural network (CNN) to a TI-84 Plus CE, making it capable of using “AI” to identify handwritten digits. As an added challenge, I implemented this in a single three-day train ride, including solving several interesting systems problems and making the code equally useable on a computer.

With the C/C++ toolchain created by the calculator hobbyist community, however, higher-level programs are possible, and I was willing to sacrifice a bit of speed for a faster proof of concept that could be finished in days, not weeks. The sample are randomly distributed, so I judged it would be sufficient to put a subset of the data on the calculator for training and testing: 42 of these AppVars consumes 2687KB of Flash, leaving enough space for the checkpoint (46KB), the CNNCE program itself, and the CE C/C++ libraries. In fact, I first had to discover that it definitely didn’t fit in the existing heap: my math confirmed that it would be far too large, but I could not positively identify exactly where it was failing, as malloc()(and new) would not correctly return nullptr when there was no available memory to reserve.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of calculator

calculator

Related news:

News photo

A Puzzle about a Calculator

News photo

Three hundred words you can spell on a calculator [pdf]

News photo

A Calculator's Most Important Button Has Been Removed