Artificial Basketball Coach

The advent of miniature and low-cost wearable sensors has allowed us to collect body motion patterns and biosignals during sports training. These signals are processed and converted to usable information about the state of the sports training. Using machine learning algorithms this information can be blended together with the knowledge about the training of specific sports discipline. Therefore, making use of wearable technology and machine learning can lead to the creation of artificial sports coaches. This is the story of how we did it for basketball.

Training in sports is a complex and involved process

Training sessions are generally prepared, evaluated and monitored by professional coaches. Coaches are intensely involved in this process and have a huge influence on the performance quality of trainees. Coach’s involvement in the training process, ultimately, decides the competition outcome.

Being a good coach is difficult due to the required knowledge and skills. Next to having deep know-how about specific sports discipline, coaches, also require an understanding of areas like anatomy, physiology, biomechanics, psychology, sociology, and didactics to make the best use of trainees’ abilities.

The aim of a training is to help an athlete or a team to reach their top performance. The training performance is evaluated by the expert coaches that reason around known principles in particular sports disciplines. Improvement in performance of an athlete is reached through physical, technical, tactical and psychological training.

What seems to be the problem?

Top-class coaches are hard to find and expensive to employ. Athletes enjoy the privileges of the clubs they join, however they are possessed with geographical and economic limitations. That is why many talented and hard-working athletes fail each year due to the lack of proper training and coaching expertise.

Hence, we must come up with a way to democratize sports training and make top class coaches available to everyone regardless of their economic and social status. We must make top class coaching accessible.

With this mindset, we focus on to accomplish this for basketball. Here is our first step.

Working towards the solution

Our main aim is to create a solution that will make basketball coaching accessible to everyone. Our solution is in the form of an artificial basketball coach that is cheap, easily adopted and capable of emulating human coach. In order to do this, we made use of wearable technology and machine learning.

Wearable devices are primarily used as basic vital condition monitoring devices nowadays, however, their full-benefit utilization is still to be explored through context-related data-intense application development. The increase in processing capacity and power efficiency and the decrease in the size of embedded processors have created an opportunity to implement advanced real-time signal processing and machine learning algorithms in miniature battery-powered wearable devices. Abilities of wearable devices to perform sensor input based detection, classification, regression and prediction in the context of their use have put them to the frontier of many different applications.

Employing wearables together with machine learning, it is possible to create artificial coaches that analyze basketball players’ exercises and offer players certain recommendations on how to increase their performance. Artificial coaches can be designed to develop players in a physical, technical, tactical and psychological sense by incorporating top-class coaching experiences.

Physical training includes basketball fitness and gymnastic exercises to improve on players speed, stamina, endurance, coordination, flexibility and strength. Tactical training is based on teaching different in-game strategies that lead to victory. Psychological training offers exercises for building player personality and improving motivation, temperament and attitude. Technical training is composed of exercises that improve players basketball skills like shooting, passing, ball handling, lay-up, etc.

Autonomous artificial basketball coach requires very little human involvement and provides a solution as if a human coach was present. The most fundamental requirement of such system is automatic exercise recognition and their quantitative and qualitative evaluation. Exercise types can be recognized by the help of wearable sensors and machine learning algorithms. Moreover, performance scoring for exercises can be accomplished by modeling the knowledge of expert coaches and relating it to e.g. shooting angle, dribbling speed, dribbling force, pass reception, etc.

Concrete actions

As the first step towards creating the Artificial Basketball Coach, we performed experimental research to recognize different technical training exercises. The experimental setup consists of a wearable device (Bibi) equipped with wireless transceiver and sensors for sensing of basketball player arm motion parameters (acceleration, angular rate and orientation).

Bibi Smart Armband

Arm motion data is sensed by the device and transmitted to a stationary hub (Raspberry Pi 3). This hub receives, stores, prepares and processes the data to ultimately identify the current state of the progress of the basketball training and recognize exercise type. Hub hosts a machine learning algorithm and will be able to use cloud computing in future applications.

Artificial Basketball Coach technology components

Machine learning stuff

To recognize the exercise type during training, a machine learning algorithm (Support Vector Machine) is employed. This algorithm is trained in the process including data collection, preprocessing and transformation (see figure below). Raw sensors’ data is prepared to be used for this machine learning algorithm to classify intended/desired training.

Training process of machine learning algorithm

There are 2 sensors in Bibi Armband, an accelerometer and a gyroscope. Using these signals orientation of the armband is calculated. Collected data is transferred to the hub through BLE.

To be able to extract meaningful insights from the collected data, raw data is prepared to be used for ML modeling process. Feature vectors are generated by extracting fix-sized windows from the preprocessed data.

Windowing

In the data transformation phase, feature sets are created and reduced to select the most distinguished ones for the classification phase. First, statistical features are calculated for each extracted window from pre-processed data. Then, employing various feature subset selection algorithms, features are selected to generate feature vectors.

Next, selected machine learning model is trained and validated by obtained dataset.

Conclusion

We have obtained 99% classification accuracy with current settings and data. Our next step in creating an Artificial Basketball Coach is to expand the exercise library and have an attempt to classify the multiple exercises in a row, i.e. pass receive — dribble — lay-up/shoot. Together with more exercises, we will incorporate feedback (through the smartphone app) in terms of the quantitative and qualitative nature of the performed training.

The main focus of this work is to present an artificial coach as much autonomous as possible to provide all training phases to athletes in a seamless manner. Athletes should not interrupt their training to interact with a device. We are currently making progress in this specific area of basketball. However, it is expected that this work will have an impact on different sports disciplines due to the similarities in training routines.

Shutout to everybody who contributed working on the technical side of the project; Inovatink team, 8Bitiz team, WECooP team. Shout out to Sinan Güler and Güler Legacy team for providing us with their basketball coaching expertise.

Thanks for reading! :) If you enjoyed it, hit that clap button 👏 and help other people to see the story.