What we do

We’re using neural networks to develop keyboarding proficiency and syntactic intuition in aspiring coders with our intelligent web application, Syntype.

Inspiration

Growing up, there was one thing we all wanted to do: write computer code. But before we could even think about coding, we first had to learn to type. Sadly, all the typing trainers we could find as kids were primitive, mechanical, and largely ineffective for learning code-style typing. This resulted in many hours wasted and bad habits developed.

How it works

To help out the next generation of coders, we’ve created Syntype, an online platform for programmers to master the typing skills they depend on – fast. Syntype uses a recurrent neural network to identify problematic key-patterns on a per-user basis and provide syntactically valid typing prompts that target those problems. These prompts are delivered live, as the user types, into a web interface. By embedding our training material within the structures of real programs, we help budding programmers simultaneously develop syntactic recognition and muscle memory. As a user’s skills and weaknesses evolve, so, too, does the training material they receive. This ensures no time is wasted practicing skills that have already been mastered.

How we built it

The core of our project consists of a recurrent neural network (RNN) built in PyTorch that is applied to the user's keystrokes. It takes, as input, the sequence of previously-typed characters as well as the next character, and tries to predict the time it will take the user to type that next character correctly. What makes it unique from typical machine learning models is the way that it is constantly trained and updated on live user input, rather than on a large corpus of predetermined training data. This allows it to adapt to the user in real-time, and maintain an up-to-date model of their typing patterns.

The backend machine learning model connects via a Websocket to the frontend web app, which was built using ReactJS. The web app gives the user a fixed typing prompt that they must try to get correct, which is sent back to the network for training. Every so often, the web app requests new prompt characters, and the network (concurrently with training) evaluates hundreds of different possibilities to select the option that would strengthen the user's typing the most.

To fit our typing prompts rigorously yet organically into Java syntax, we first scraped various source code repositories to build a database of popular program constructs. We parsed this code into generic templates, then refilled the templates with training material using a stochastic approach. These were finally fed into our neural net and vetted on the fly for delivery to the front end.

Next steps

We would like to implement Syntype as a plugin for desktop text editors, allowing for continued development of the neural network outside our web app. We would also like to add support for training syntax rule sets outside of Java.

Built With

Share this project:

Updates