<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jacob James on Medium]]></title>
        <description><![CDATA[Stories by Jacob James on Medium]]></description>
        <link>https://medium.com/@jpon24?source=rss-fe16eed27b2b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uOTFpGeCmvYKpACg7xgo9w.jpeg</url>
            <title>Stories by Jacob James on Medium</title>
            <link>https://medium.com/@jpon24?source=rss-fe16eed27b2b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 06:32:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jpon24/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Player Learns. Why Don’t the Enemies? Building a Reinforcement Learning Souls-Like in One Week]]></title>
            <link>https://medium.com/@jpon24/the-player-learns-why-dont-the-enemies-building-a-reinforcement-learning-souls-like-in-one-week-8c4bc3b3d62f?source=rss-fe16eed27b2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c4bc3b3d62f</guid>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[unity-game-development]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <dc:creator><![CDATA[Jacob James]]></dc:creator>
            <pubDate>Sat, 06 Jun 2026 04:32:31 GMT</pubDate>
            <atom:updated>2026-06-06T04:32:31.287Z</atom:updated>
            <content:encoded><![CDATA[<p>For the last five years, I’ve been building games.</p><p>Like many developers, I started with simple projects: basic platformers, arcade-style games, and small experiments designed mainly to learn. As I gained more experience, I moved into 3D development, learning animation, modeling, environment design, and game systems.</p><p>Over the years I’ve built a variety of projects. I created my first souls-like game in Grade 9, developed a small tower defense game in 3D, and built environments inspired by works such as Macbeth and Lord of the Flies. While all of these projects were different, they shared the same purpose: helping me improve my skills as a developer.</p><p>One genre, however, has always stood out to me: souls-like games.</p><p>Games such as Elden Ring, Dark Souls, and many of their successors are known for their challenging combat, memorable boss fights, and rewarding progression systems. Both indie and AAA studios have made their attempts in this genre, but there remain issues that every Souls-Like shares.</p><p>Eventually, the predictability of the enemies makes them trivial.</p><p>At first, bosses feel impossible. You die repeatedly while learning attack patterns, dodge timings, and openings. But after enough attempts, the challenge starts to disappear because the enemy never changes. The player learns, but the enemy doesn’t.</p><p>To try and fix this, I wanted to create a Souls-Like game where the enemies could learn too.</p><p>More specifically, I wanted to explore whether reinforcement learning could be used to create enemies that adapt to different player behaviors rather than following a fixed set of rules.</p><p>The only problem?</p><p>I had one week to build a proof of concept.</p><p>So I got to work.</p><h3>Day 1: Character Creation</h3><p>The first step was deciding what I wanted the game to look like.</p><p>I gathered reference art from Pinterest (<a href="https://ca.pinterest.com/pin/1105141196093249352/">link to art here</a>) and started experimenting with AI-assisted workflows to rapidly create game assets. Using Hunyuan 3D, I generated a character model based on the concepts I had collected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*XaZ0_bOjQwE7k-EjGUz4xQ.png" /><figcaption>Initial Generation of Model from Hunyuan 3D</figcaption></figure><p>Once the model was generated, I imported it into Mixamo to automatically rig the character and generate a basic animation set. By the end of the first day, I already had a fully functional character model with idle, walking, running, dodging, and attacking animations imported into Unity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*xeWB0NeYEZjmHJTG_7dziA.png" /><figcaption>Freeze Frame of a Dodge Roll Animation</figcaption></figure><p>A series of tasks that would have taken me weeks a few years ago now took only a few hours.</p><h3><strong>Day 2: Building the Player Controller</strong></h3><p>With the player art established, I shifted my attention to gameplay systems.</p><p>I connected animations to actual mechanics and began building the player controller. By the end of the day, the character could:</p><ul><li>Move around the environment</li><li>Look around freely</li><li>Lock onto enemies</li><li>Perform basic attacks</li><li>Execute a simple dodge roll</li></ul><p>None of these systems were particularly polished yet, but they provided the foundation I needed for combat.</p><p>At this point, I also added enemies that would simply sit there as hitboxes and lock on targets, allowing me to test my systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*FLetol2VBnOPHOEUgbGsoA.png" /><figcaption>Character and Enemy with Simple Hitbox</figcaption></figure><p>However, my environment was still just a unity plane with a yellow material. I needed more than that.</p><h3><strong>Day 3 &amp; 4: Environment Design</strong></h3><p>Because of this, I started focusing on building the world itself. Most of this time was spent inside Blender creating a small courtyard environment and a colosseum-style arena intended for future boss fights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*fy9xCvaSEFAk7cVMdWBnBQ.png" /><figcaption>Initial Textured Environment in Blender</figcaption></figure><p>I modelled out and textured the environment, importing trees from the unity asset store and adding them manually into the system in unity. Afterwards, I manually made some of the collisions for the world, allowing the player to successfully navigate around.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LDZUKPimZP12DugsE18aIA.png" /><figcaption>Final Environment in Unity With Trees</figcaption></figure><h3><strong>Day 5 &amp; 6: Enemy Creation</strong></h3><p>Once the environment was complete, I turned my attention back to enemy creation.</p><p>I used a workflow similar to the player character. Starting with concept ideas, I generated reference views using ChatGPT, converted those references into 3D models using Hunyuan 3D, and imported the resulting assets into Unity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*VtsDyQCN_2lBffo9WHP-hA.png" /><figcaption>Reference Image for Enemy (GPT Generated)</figcaption></figure><p>This allowed me to create enemy characters in a fraction of the time that a traditional modeling workflow would require.</p><p>After the models were imported, I reused portions of the player code and implemented enemy navigation using Unity’s NavMesh system. By the end of this stage, enemies could move around the environment, chase the player, and engage in combat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*yA2IIAfxVU1_gArMCnHXUg.png" /><figcaption>Fighting Enemy for the First Time</figcaption></figure><p>At this point, the game technically worked.</p><p>Enemies could chase the player, attack, and fight back. The player could dodge and attack in return. The problem was that the enemy behavior was incredibly predictable.</p><p>The AI followed a simple loop:</p><ol><li>Chase the player.</li><li>Move within attack range.</li><li>Attack.</li><li>Resume chasing if the player escapes.</li></ol><p>While functional, this behavior was the exact opposite of the vision I had for the project. I wasn’t trying to build another predictable enemy. I wanted enemies that could adapt. That meant it was finally time to implement reinforcement learning.</p><h3><strong>Day 7: Reinforcement Learning</strong></h3><p>To train the enemy, I used Unity ML-Agents.</p><p>I created a separate training environment consisting of:</p><ul><li>A small arena</li><li>An enemy agent</li><li>A player agent</li><li>Several predefined behavior profiles for the player agent</li></ul><p>Some of these predefined behaviour profiles included:</p><ul><li>Standing still</li><li>Constant dodging</li><li>Rushing the enemy agent and attacking (similar to the current enemy system)</li><li>Circular strafing</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*KBIYOnh1Zk8iRKaVCcNQqg.png" /><figcaption>Training Environment</figcaption></figure><p>These profiles allowed me to expose the enemy to different playstyles during training. In order to train it, the agent was given rewards and penalties for its actions.</p><p>The enemy received rewards for:</p><ul><li>Damaging the player (small)</li><li>Defeating the player (large)</li></ul><p>The enemy received penalties for:</p><ul><li>Each step (very small)</li><li>Taking damage (small)</li><li>Dying (large)</li></ul><p>Over time, the agent learned that the optimal strategy was to defeat the player as quickly as possible while avoiding damage itself.</p><p>One challenge was that the enemy was still extremely limited. At this stage it only had access to basic movement and attacks. It didn’t even have a dodge mechanic implemented yet. Because of that limitation, the learning opportunities were relatively small.</p><p>Initially, I trained the model for only 100,000 steps, which equated to roughly 20 minutes of simulation time. Unsurprisingly, the results were worse than the handcrafted AI system. Later, I increased training to approximately 500,000 steps and experimented with different player behavior profiles.</p><p>The results became much more promising.</p><p>The reinforcement learning model began performing comparably to the handcrafted behavior system despite having very limited actions available. This was important because it validated the core idea behind the project. If reinforcement learning could match traditional AI with such a limited enemy, the benefits should become much more apparent as additional attacks, dodges, movement abilities, and boss mechanics are added.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MMrR_0BQ1G24mFcaIUDU9Q.png" /><figcaption>Playing Against Inference Based Enemies</figcaption></figure><h3><strong>Expanding the Prototype (Boss Room)</strong></h3><p>After the initial proof of concept was complete, I spent some additional time improving the boss arena. I implemented a functioning fog gate and encounter trigger system. When the player enters the arena, the boss fight begins automatically. The boss itself is intentionally designed as a reflection of the player. It uses the same model, but I have adjusted the texturing to make it more shadowy and reflective, attempting to create an “off” mood. The goal of this change is to reinforce the central theme of the project: adaptation. While the boss systems are still incomplete, the existing enemy architecture should allow me to implement them using many of the same underlying behaviors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*uPXpLx_51VBXwrK0or8RGQ.png" /><figcaption>Boss Appearance in Game</figcaption></figure><h3><strong>What I Learned</strong></h3><p>One of the biggest lessons from this project had nothing to do with reinforcement learning. It was learning how modern development workflows are changing what small teams can accomplish. Tasks that once took weeks now take hours. Character creation, rigging, animation, concept generation, and prototyping can all be accelerated dramatically using modern AI-assisted tools.</p><p>However, that doesn’t mean human artists are being replaced.</p><p>In fact, professional artists will continue to produce significantly higher-quality work than AI-generated assets. What these tools do provide is a starting point. For independent developers, that starting point can make the difference between spending six months building a prototype and spending one week building it. That speed allows more time to be spent on what matters most: game design.</p><h3><strong>Next Steps</strong></h3><p>This project is still only a prototype. My next goal is to expand it into a complete game and continue experimenting with more advanced enemy behaviors.</p><p>Right now, enemies can learn against predefined player profiles. Eventually, I want them to adapt to the actual player sitting behind the controller. Imagine a boss that notices you always dodge left. Or an enemy that realizes you’re playing aggressively and begins punishing overcommitment.</p><p>That’s the direction I want to explore.</p><p>Over the next few months, I’ll continue developing the project and documenting the process through development logs on YouTube. If you have feedback, ideas, or suggestions, I’d love to hear them. Feel free to leave a comment or connect with me on <a href="https://www.linkedin.com/in/jacob-james-b87ba8377/">LinkedIn</a>. As a young developer, I’m still learning every day, and I’m always open to advice.</p><p>I believe AI-assisted development and adaptive game systems are going to become increasingly important parts of the gaming industry. Whether that’s through faster production pipelines, smarter NPCs, or entirely new gameplay experiences, we’re only beginning to see what’s possible.</p><p>I’m excited to keep building and see where this project goes next.</p><p>Thanks for reading!</p><p><a href="https://www.youtube.com/watch?v=03IcvjbkVLM&amp;t=14s">My first devlog</a></p><p><a href="https://www.linkedin.com/in/jacob-james-b87ba8377/">My LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c4bc3b3d62f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Brain Computer Interfaces (BCI) Could Improve Focus]]></title>
            <link>https://medium.com/@jpon24/how-brain-computer-interfaces-bci-could-improve-focus-95c6307d5306?source=rss-fe16eed27b2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/95c6307d5306</guid>
            <category><![CDATA[neuroscience]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[brain-computer-interface]]></category>
            <dc:creator><![CDATA[Jacob James]]></dc:creator>
            <pubDate>Mon, 13 Oct 2025 03:47:25 GMT</pubDate>
            <atom:updated>2025-10-13T03:47:47.111Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Tasks done well require sufficient focus.</strong></h4><p>In this world of low attention spans, excessive notifications and countless distractions, it can sometimes be difficult to stay on track. This lack of focus leads to inefficiency, poor results, and in some cases can be dangerous. For example, 22.5% of fatal car incidents in Canada are related to distracted driving. If we had some sort of mechanism to measure and alert people of a lack of focus, the chances of this happening would reduce significantly.</p><p>Another thing this strongly effects is the focus of individuals when trying to perform work tasks, such as studying or writing an email. In these tasks, if someone is not able to maintain focus due to excessive distraction, it is likely for the product to be sub-par. In the studying example, this could lead to falling behind in classes through a lack of foundational understanding.</p><p>While many current methods of staying on task rely heavily on feel, the act of losing focus can be monitored discretely. This can be done through the use of <strong>Electroencephalography (EEG).</strong></p><h3>What is EEG?</h3><p>EEG is a way to monitor the electrical signals that are happening within the brain. This is done by putting a collection of electrodes on the scalp near specific zones in order to pick up overall readings from those areas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/1*ACPOcePUaou8LgVHS8O7tg.png" /><figcaption>Basic diagram of how EEG works — electrode-&gt;amplifier-&gt;measured potentials graphed and processed. Taken from ResearchGate</figcaption></figure><p>Before we get into how EEG actually works, it helps to first know about the neuron.</p><p>Neurons contain a few main parts that are important to signaling:</p><ul><li>Dendrites</li><li>Soma</li><li>Axon</li><li>Axon terminal</li></ul><p>Dendrites are kind of like roots — when they receive data from the previous neuron (presynaptic) they have the long, skinny membranes that allow sodium ions to diffuse in quickly. These membranes open up after coming in contact with neurotransmitters that are released from the axon terminal.</p><p>The soma is essentially the body of the neuron, or like the trunk continuing the tree analogy. This contains the nucleus and other organelles, and connects the dendrites to the axon.</p><p>The axon is the pathway in which the neuron uses to move data across a longer distance. These axons are surrounded in a substance called myelin, which helps to insulate the axon and prevent loss.</p><p>In this communication process, the presynaptic neuron is the one releasing the neurotransmitters, whilst the postsynaptic neuron is the one that receives them.</p><p>EEG utilizes this system to measure the summed up post-synaptic potentials of the neurons, giving a <strong>voltage</strong>. Postsynaptic potentials are caused by an imbalance of charge after sodium ions swarm into a neuron following the connection of a neurotransmitter. When graphed, this shows a fluctuation around a baseline, giving a noisy waveform representation of the signals in that specific zone. These waves themselves are not very useful though — signal processing is required in order to pull data from them. EEG readings are made up of graphs from multiple different frequencies, divided into different names and thresholds. By looking at variations in these specific bands of the frequency, we can see certain actions that the person is performing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LiG2bFJ4iDseBQvR95qG3g.png" /><figcaption>A visualization of the different frequencies using python (simply using sin waves, no noise)</figcaption></figure><p>While it is important to note that EEG would generally have significantly more noise than shown above, it demonstrates the five categories: Delta, Theta, Alpha, Beta and Gamma.</p><p><strong>Delta </strong>and <strong>Theta </strong>waves are usually picked up during sleep and deep relaxation. <strong>Alpha </strong>waves are usually picked up on precognitive tasks, as well as things that are in a resting wakefullness state. These are important for determining attention. <strong>Beta </strong>waves occur as a result of actions such as moving and completing tasks. Lastly, <strong>gamma </strong>waves occur during highly focused tasks, such as learning or complex problem solving. In order to use these wavelengths, they must be sorted out of the overall reading by utilizing a bandpass filter. These filters take a certain frequency and zone in on it, kind of like turning a radio dial. Inputting the raw EEG data, it extracts the wave between a certain range (ex. Alpha (8-13Hz)), setting the rest of the signal to zero. This allows us to get decently accurate detections of the behaviours associated with each of the bands.</p><p><strong>However, how does this relate to focus?</strong></p><h3>The Attention System</h3><p>Throughout history, many scientists have theorized how attention works, with theories continuing to get better over time. However, due to its complex nature, we still do not fully understand it. Nonetheless, ideas about attention originated in the 1950s with the Broadbent theory.</p><p>The broadbent theory is based around the idea of the brain selecting what is important from sensory inputs, and only carrying out processing on those specific inputs. This was supported by an experiment in which subjects received different input into each ear, and were asked to repeat what they heard in chronological order. However, the subjects would instead repeat everything heard from one ear and then from the other. They used this evidence to conclude that the brain selects what it should attend to, and then processes that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*tAjZQYpWXBGcloXyh_FmxQ.jpeg" /><figcaption>A flowchart showcasing the steps of the broadbent filter theory. Taken from Wikipedia (<a href="https://en.wikipedia.org/wiki/Broadbent%27s_filter_model_of_attention">https://en.wikipedia.org/wiki/Broadbent%27s_filter_model_of_attention</a>)</figcaption></figure><p>Later, this was contradicted by the existence of the cocktail party effect. This relates to the effect of hearing one’s own name in a conversation that was previously unattended, and yet attention would swap anyway. A new theory arose from this with the idea that the processing happens prior to the selection.</p><p>Although this made more sense, the idea of processing every single bit of sensory input seems heavily inefficient, leading to the introduction of the Treisman Attenuation Theory. This theory suggested that unattended information was attenuated (reduced) instead of completely removed.</p><p>While these models helped to provide some basic understanding of the field, they are not nearly as applicable to today’s knowledge. Today, theories are still developing, but a very strong and well cited theory is Posner’s Triple Attention Network Theory.</p><p><strong>Posner’s Triple Attention Network Theory</strong></p><p>As the name suggests, Posner’s theory is based around the idea of three different systems that handle different parts of attention: alerting, orienting and executive.</p><p>The <strong>alerting </strong>system is a system that is focused on maintaining vigilance, which is a sustained attention and ability to respond to unexpected stimuli. This system allows attention to switch in the case of danger, acting as a portion of the body’s sympathetic nervous system. The sympathetic nervous system is the body’s fight-or-flight response, which increases blood pressure, heartrate and other factors in order to handle stressful situations. The alerting system functions automatically.</p><p>The <strong>orienting </strong>system selects relevant inputs to focus on, given multiple inputs (similar to aforementioned systems of selective attention). Specifically, it is able to focus by selecting a modality (sense) or location to focus on. This system is shown through the Posner Cueing task, which is an experiment where a person is shown boxes and told to press a button once a target appears. However, right before this target is shown, some form of stimulus such as a flash or arrow will draw attention to one of the boxes. In a valid trial, this indicator is associated with the box in which the target appears. Inversely, invalid trials lead the person astray, placing the stimulus near a box that does not contain the target. Posner determined that subject reaction time decreased significantly in invalid trials, as the orienting system had to switch back and forth between multiple stimuli. This is also referred to as the inhibition of return, which means that the return to attention of a previously attended location slows down detection of a target in that area.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*2sFGbl3lQpZwwA4pn9Mikg.png" /><figcaption>Diagram showing the steps of the Posner Cueing Task, showing both a valid trial (right) and an invalid trial (left). Taken from Disconnectome studio (<a href="http://165.232.73.88/visuospatial_page_info/">http://165.232.73.88/visuospatial_page_info/</a>)</figcaption></figure><p>Lastly, the <strong>executive </strong>system is used to resolve conflict between the other systems. This is can be measured using the Stroop test, in which people are shown words representing colors such as red, blue or green. These texts are presented in font colors differing from the word itself. As an example, text may say the word “red” but appear in yellow. When asked what the font color of the word is, the executive system must distinguish between the automatic response and a manual response, making it a very difficult task.</p><p><strong>However, how does this relate to EEG?</strong></p><p>The different behaviours of these attention systems can be classified within EEG frequency bands, thus allowing measurement if electrodes are measuring the correct area. For example, EEG readings can indicate the level of alertness someone has. During lapses in one’s alertness, theta waves (4–7Hz) may be observed. However, vigilance tasks may exhibit a response in the beta frequency band (13–30Hz). This could allow some form of Brain Computer Interface to pick up on these changes in alertness via change in frequency, indicating one’s level of focus.</p><p>While this seems promising, EEG data is incredibly noisy, and basic code cannot easily see patterns the way we can. Because of this, the industry currently uses a mixture of signal processing and Machine Learning algorithms in order to get truly relevant information.</p><h3>Uses of Machine Learning for EEG Patterns</h3><p>Due to the complexities of the patterns that arise from these signals, Machine Learning (ML) is preferable when attempting to understand behaviours.</p><p><strong>What is ML?</strong></p><p>Machine learning is a branch of artificial intelligence used to learn and pick up patterns in a dataset, and use what it learned to make predictions on new data. It can be broken up into two main sections: <strong>supervised learning </strong>and <strong>unsupervised learning</strong>. Supervised learning is when a model is fed labelled data, meaning that the data is already classified. For example, if passing in images of cats and dogs, an image of a dog would be labelled “dog.” Unsupervised learning is when a model is simply fed the data, utilizing an algorithm to find the patterns itself. In relation to EEG, many of the currently used approaches are forms of <strong>supervised learning.</strong></p><p>However, due to the nature of EEG data (as shown below), it first must undergo heavy signal processing before it can be used effectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*F8s6bFYOqrfzC93Z0EEG-g.png" /><figcaption>Graphs of raw EEG data before and after preprocessing. a) shows before, b) shows after. Taken from Semantic Scholar (<a href="https://www.semanticscholar.org/paper/Automated-Classification-and-Removal-of-EEG-With-Sai-Mokhtar/1ead4dd7fd1efe9174656c351832241adc60dd69">https://www.semanticscholar.org/paper/Automated-Classification-and-Removal-of-EEG-With-Sai-Mokhtar/1ead4dd7fd1efe9174656c351832241adc60dd69</a>)</figcaption></figure><p><strong>Preprocessing</strong></p><p>When processing EEG data, there are many interfering signals that must be removed. These include signals such as nearby interferences, muscle noise and cardiovascular noise. There are three types of filters that are really helpful for removing some of this noise: bandpass, low pass and notch. As mentioned, a bandpass filter extracts portions of a waveform within a given range by removing other frequencies. Notch is the opposite, suppressing only the portions within a given range. Low pass filters allow all frequencies to pass through up to a given threshold, attenuating all future frequencies.</p><p>Low pass filters combined with notch filters and other techniques can help to remove the unusuable noise in the signal. Afterward, the bandpass filters can be used to pull out specific frequency bands (theta, alpha, beta etc.) and use those in the ML model.</p><p><strong>Algorithms</strong></p><p>Depending on the problem that is being solved, different algorithms make more sense to be used. In the case of a binary output (yes or no), one of the simplest algorithms to use is a logistic regression. Logistic regression is a form of supervised learning that is used to determine the probability that an input belongs to one of two classes. It does this by outputting the probability of an input belonging to the positive class (ex. 0.9 for 90% chance of yes), and then using a threshold such as 0.5 to determine the classification.</p><p>In this case, the input is the increase and decrease of the amplitude of a specific frequency in response to a change in focus. This means that with enough training data, the model should be able to theoretically determine if someone is maintaing focus, or if they have experienced distraction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S8iCoqOBvXVn6Ipw_E18yg.png" /><figcaption>Synthetic example of utilizing logistic regression for EEG patterns</figcaption></figure><p>However, this approach is not limited to the problem of focus. The above image is not focused on the concept of attention, but instead uses a logistic regression algorithm to predict a P300 response, which is basically the mind’s “aha” response. This shows that the possibilities of this technology are endless, and advancements will only continue as the field progresses.</p><h3>Future Possibilities with This Technology</h3><p>One amazing opportunity that may arise from this technology is the ability to augment cognition. Augmented cognition is the concept of integrating technology with the brain to enhance cognitive capabilities. Imagine a world where your mind was always pointed in the right direction, and you were able to effortlessly stay on track, even through a lack of energy or burnout. Not only would this boost productivity, it would lower the chance of vehicles accidents, workplace mistakes and even improve day to day interactions. However, this sort of two-way BCI most likely will not happen for sometime. Instead, the near future can focus on perfecting one way BCIs, including adding automations based on the signals that are read by the system. For example, the system could use a notification system to notify you when losing focus (although this could pose an issue to the alerting system if too intrusive). Even further, the EEG device could interact with a phone or laptop in order to carry out tasks, kind of like a mental Siri.</p><p>Whats even better — its already being done.</p><h3>Neurable</h3><p>Neurable is a company that makes BCI headphones, which have small electrodes on the ears which read realtime EEG signals. It uses these EEG signals to figure out if the wearer is starting to drift, thus telling them good times to take breaks throughout the day. The point of this technology is to reduce burnout, whilst increasing productivity. Also, it can flag strange neuro behaviours as an early classifier of diseases such as Parkinsons or Alzheimers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*98_pF_0UFvKMhdaw29VDPw.jpeg" /><figcaption>Image of Neurable MW75 Neuro Headset</figcaption></figure><h3>Future Continued</h3><p>I see a future where these technologies are able to influence a wide variety of industries. One example is the idea of BCI prosthetics, where ML and EEG could detect signals in the motor cortex in order to smoothly move a limb. Furthermore, this could connect to the gaming industry (already being done! <a href="https://shop.openbci.com/products/galea?srsltid=AfmBOor_yxPDH1aGDKUuDxH7DWe1Drxjv5LVsAiGNGWo6z6vnqDHjj8x">OpenBCI Galea</a>) adding immersion to gameplay. Most importantly for students and workers around the world, the use of BCI to help stay on task would be absolutely monumental. While some of these ideas are mere sci-fi, BCI is still a relatively new field. I am excited to see the direction in which these technologies and innovations go, and what that may mean for the future of our very species.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95c6307d5306" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>