As technology workers, our brains are our most important tools. Our brains are also highly variable, some willing to work late into the night and others shutting down at 3PM and only restarting early the next day. But while we feel these fluctuations, most people never look into them closely. We half-heartedly force ourselves to work whenever is most convenient for our schedules, completely ignoring the fact that we are wasting our time.
But aren't we technology workers? Can't we use the tools we've spent decades building to improve the tools we've been given at birth? Introducing MindSet.
What it does
To calibrate the MindSet system, the user wears the Muse headband while doing something on their laptop. At five minute intervals, the user is prompted to complete a short math challenge.
After one or two hours of data collection, the system uses linear regression, a type of machine learning, to analyze the collected data and create a custom "brain function", correlating the brainwaves recorded by the Muse to the user's state of mind. Using the brain function, the MindSet system can later use data from the Muse headband to calculate how efficiently the user's brain is working at that moment.
This data is then displayed on a graphical user interface, allowing users to know exactly when their mind is at its most effective, and thereby make quantitatively informed decisions about their most valuable tool.
How we built it
The Muse headband records five different types of brainwaves: alpha, beta, delta, gamma and theta. The Muse headband sends this data to an Android app using a Bluetooth Low Energy connection. Every five seconds, the Android app uses a POST request to send the collected data to a Python script running on a DigitalOcean server. The Python script writes the incoming data into a file.
During normal operation, a separate Python script, running on the same server, waits for and serves the graphical user interface, which asks for the data using POST requests. The graphical user interface, written in react, calculates the "brain function" and displays it along with the raw brainwave data.
During calibration, a node script pops up a laptop notification with a link to the challenge every five minutes. The challenge is 10 simple math questions, and records how fast the user completes the challenge (this whole process is implemented as a react web app).
The data from the muse headband and the math challenges is copied into a Python Pandas script that draws various graphs and performs linear regression, a type of machine learning. This data is visually analyzed, a model is chosen, and a function for brain wave level to brain efficiency is derived.
Challenges we ran into
Anna's laptop cannot use Bluetooth Low Energy, so we built an android app and a python API to transfer data from the muse headband to Anna's phone to a Python server to the application user interface.
Accomplishments that we're proud of
When we collected data on Anna's brain function and ran our data analysis algorithm, the results turned out very clean: as it turns out, mathematical speed correlates strongly with high levels of "theta" brain waves and low levels of "gamma" brain waves. This means that the predictive ability of our system is likely to be very strong.
What we learned
Anna likes to code late into night because her brain reaches peak efficiency at 2AM! That may be a learned behaviour, but it's still really cool to see quantitative data justifying "bad" habits.
What's next for MindSet
It would be really interesting to actually run the system for a long period of time and see how brain function fluctuates through a typical day. At the current moment, our collected data is limited to the interval of midnight to 3am, and even just that has yielded fascinating insight.