The researchers said the algorithm can figure this out by looking at your mobile activity, considering factors like the time since you last had a call or text, the time of day, and how intensely you are using the phone, MIT Technology Review reported.
The researchers found that looking at this kind of data gave a reliable prediction of boredom as often as 83 percent of the time.
While using machine learning to infer your state of mind is tricky, doing so reliably via your smartphone could be powerful.
For instance, if an app were able to predict that you are bored, and also knew where you were, it could try to feed you content it thinks you would like in that particular context.
The researchers first determined characteristics of boredom by using an Android app to ask study participants to rate their level of boredom several times a day over two weeks.
The responses were compared with other data extracted from the phones measuring things like how many apps they used, and how intensely the phone was used overall (both measures rose as people got more bored).
To validate the resulting algorithm, researchers built another Android app that concluded on its own whether the user was bored, and, when it did, sent an alert to their phone asking if they wanted to read an article.