Your Brain On Java
Project Illithid
arto.santala@solita.fi
Who am I?
• Arto Santala
• Work as software architect in Solita, producing tailored
solutions to accelerate customer business
• 25 years of experience making customers dreams come
true with application of proper technologies and
methodologies, more dabbling before that
• Guilty of writing a lot of horrible code in the 90’s that
should be burned with fire. Always aiming to improve.
• Passionate about agile and automation. Trying to make
every moment worthy of living.
I’m not a brain scientist!
… but I can take a look…
Why brains?
Brainwaves 101
• Basically….
• It’s communication between neurons within Your brain
• Electrical pulses, detected by sensors on scalp
• Divided into bandwitdths that activate on different situations
• Slow, loud, functional, fast, suble, complex
• Symphony of frequencies, bassline, drums, pads, lead synth
• Thoughts, emotional state
How to read the brain
• Lower frequency brainwaves activate:
• Tired, slow, sluggish, dreamy, meditation
• Higher frequency brainwaves activate:
• Wired, hyper-alert, concentrated
Just get a Brain-Computer Interface! (BCI)
DELTA WAVES (0.1 TO 3 HZ)
• Delta Waves, the slowest but loudest brainwaves
• They are generated in deepest meditation and dreamless sleep
• Delta waves suspend external awareness and are the source of empathy
• Healing and regeneration are stimulated in this state, and that is why deep
restorative sleep is so essential to the healing process
• Deep, dreamless sleep, non-REM sleep, unconscious
THETA WAVES (4 TO 7 HZ)
• Occur most often in sleep but are also dominant in deep meditation
• Dreaming, deep meditation, daydreaming
• Our gateway to learning, memory, and intuition
• Our senses are withdrawn from the external world and focused on signals originating
from within
• In theta we are in a dream; vivid imagery, intuition and information beyond our normal
conscious awareness
• When we’re doing a task that is so automatic that the mind can disengage from it e.g.
brushing teeth, driving a car long distance, showering, or coding in Java
• Intuitive, creative, recall, fantasy, imaginary, dream
ALPHA WAVES (8 TO 12 HZ)
• Alpha brainwaves occur during quietly flowing thoughts, but not quite meditation
• Alpha waves detected when eyes are closed and feeling relaxed, and activities such as:
• Yoga, just before falling asleep, being creative and artistic
• Alpha is the resting state for the brain: Relaxed (but not drowsy), tranquil, conscious
• Alpha waves aid overall mental coordination, calmness, alertness, mind/body integration
and learning
• A person who has completed a task and sits down to rest is often in an alpha state
• A person who takes time out to reflect or meditate is usually in an alpha state
• A person who takes a break from a conference and walks in the garden is often in an
alpha state
BETA WAVES (12 TO 30 HZ)
• Our normal waking state of consciousness, alert, active thinking
• Active conversation, decision making, problem solving, focusing on a task, learning a new concept,
debate
• Beta brainwaves dominate our normal waking state of consciousness when attention is
directed towards cognitive tasks and the outside world
• Beta is a ‘fast’ activity, present when we are alert, attentive, engaged in problem solving,
judgment, decision making, or focused mental activity
• Beta brainwaves are further divided into three bands;
• Lo-Beta (Beta1, 12-15Hz) can be thought of as a 'fast idle', or musing, relaxed yet focused
• Midrange Beta (Beta2, 16-20Hz) is high engagement or actively figuring something out, aware of self &
surroundings, thinking
• Hi-Beta (Beta3, 20-30Hz) is highly complex thought, integrating new experiences, high anxiety, or
excitement, alertness, agitation
• Continual high frequency processing is not a very efficient way to run the brain, as it takes a
tremendous amount of energy.
GAMMA WAVES (30 TO 100 HZ)
• The fastest of brain waves (high frequency, like a flute), and relate to simultaneous
processing of information from different brain areas
• The most subtle of the brainwave frequencies, the mind has to be quiet to access gamma
• Gamma was dismissed as 'spare brain noise' until researchers discovered it was highly
active when in states of universal love, altruism, and the ‘higher virtues’
• Gamma is also above the frequency of neuronal firing, so how it is generated remains a mystery
• It is speculated that gamma rhythms modulate perception and consciousness, and that a
greater presence of gamma relates to expanded consciousness and spiritual emergence
Gamma brainwaves have been observed to be much stronger and more regularly observed in very
long-term meditators including Buddhist Monks.
All together now!
• Research has shown that although one brainwave state may predominate at any given
time, depending on the activity level of the individual, the remaining three brain states are
present in the mix of brainwaves at all times
• In other words, while somebody is an aroused state and exhibiting a beta brainwave
pattern, there also exists in that person's brain a component of alpha, theta and delta, even
though these may be present only at the trace level
• For example, you can see meditational state listed under more than one brainwave type
• One benefit of measuring that big shiny brain of yours is to understand what effects your
state of mind, and be able to exercise the state that you find beneficial
Some projects and products
• The first use of NeuroSky's technology was by the USA Olympic Archery team to improve
their game
• Musinaut is a Paris-based music company that plans to use the device to create
interactive music technology that controls a user's music based on their thoughts and
moods.
• Mindflex: The MindFlex was produced in conjunction with Mattel and released for the
2009 Christmas season. It is a game in which players lift a ball by concentrating and
move it through a maze.
• Star Wars Force Trainer: The Star Wars Force Trainer was produced in conjunction with
Uncle Milton inc. and released for the 2009 Christmas season. It is a game in which
players lift a ball by concentrating.
• MindRDR: MindRDR is a Google Glass application created by This Place that connects a
Neurosky MindWave sensor to Google Glass to allow concentration and relaxation
outputs from the biosensor to take and share photos on Twitter and Facebook without
physical or verbal interaction.
https://github.com/crystoll/projectillithid
Timestamp,Raw,Attention,Meditation,delta,theta,low-alpha,high-alpha,low-beta,high-beta,low-gamma,mid-gamma
2020-03-24T09:40:54.021202,276,64,70,157747,43827,40970,6794,3470,5856,2459,2794
2020-03-24T09:40:54.526261,-276,64,70,157747,43827,40970,6794,3470,5856,2459,2794
2020-03-24T09:40:55.027329,169,64,70,607431,45304,11544,8435,8700,2767,681,5474
2020-03-24T09:40:55.531139,-202,64,70,607431,45304,11544,8435,8700,2767,681,5474
2020-03-24T09:40:56.033906,327,48,64,423137,241863,26339,86426,8679,13665,3234,16226
2020-03-24T09:40:56.539423,-235,48,64,423137,241863,26339,86426,8679,13665,3234,16226
2020-03-24T09:40:57.040400,264,69,67,1991459,118446,39071,17811,21472,10533,4501,15851
2020-03-24T09:40:57.541347,-254,69,67,1991459,118446,39071,17811,21472,10533,4501,15851
def read_and_fix_data(path):
"""
Read csv file, normalize timestamp to a new column, Time,
so that timescale is comparable
"""
df = pd.read_csv(path,header=0)
df['Timestamp'] = pd.to_datetime(df['Timestamp']).astype('int64')
max_a = df.Timestamp.max()
min_a = df.Timestamp.min()
min_norm = -1
max_norm =1
df['Time'] = (df.Timestamp- min_a) *(max_norm - min_norm) /
(max_a-min_a) + min_norm
return df
Moar
• https://www.youtube.com/watch?v=rSQNi5sAwuc (Move anothers hand with power of mind)
• https://aip.scitation.org/doi/pdf/10.1063/1.5132449 (Mindwave Mobile as wheelchair
controller)
• https://www.hackster.io/cnns4eegs/deep-learning-for-seizure-prediction-wearable-5ad2d3
• https://www.hackster.io/ayushkapur10/3d-printed-eeg-controlled-prosthetic-arm-2c9104
• https://www.hackster.io/andrewstein/brain-controlled-hue-light-via-octoblu-daa215
• http://hex-machina.com/hw/mindbullets
• https://learn.sparkfun.com/tutorials/hackers-in-residence---hacking-mindwave-mobile/all
• http://developer.neurosky.com/docs/doku.php?id=projects
• http://www.justintimmer.com/reading-my-mind-with-an-eeg-headset-a-product-review-of-
the-mindwave-mobile-by-neurosky/
Start hacking!
ARTO SANTALA
Software Architect, Solita Oy
arto.santala@solita.fi
https://github.com/crystoll/projectillithid
Your Brain on Java

Your Brain on Java

  • 1.
    Your Brain OnJava Project Illithid arto.santala@solita.fi
  • 2.
    Who am I? •Arto Santala • Work as software architect in Solita, producing tailored solutions to accelerate customer business • 25 years of experience making customers dreams come true with application of proper technologies and methodologies, more dabbling before that • Guilty of writing a lot of horrible code in the 90’s that should be burned with fire. Always aiming to improve. • Passionate about agile and automation. Trying to make every moment worthy of living.
  • 3.
    I’m not abrain scientist! … but I can take a look…
  • 4.
  • 5.
    Brainwaves 101 • Basically…. •It’s communication between neurons within Your brain • Electrical pulses, detected by sensors on scalp • Divided into bandwitdths that activate on different situations • Slow, loud, functional, fast, suble, complex • Symphony of frequencies, bassline, drums, pads, lead synth • Thoughts, emotional state
  • 6.
    How to readthe brain • Lower frequency brainwaves activate: • Tired, slow, sluggish, dreamy, meditation • Higher frequency brainwaves activate: • Wired, hyper-alert, concentrated Just get a Brain-Computer Interface! (BCI)
  • 8.
    DELTA WAVES (0.1TO 3 HZ) • Delta Waves, the slowest but loudest brainwaves • They are generated in deepest meditation and dreamless sleep • Delta waves suspend external awareness and are the source of empathy • Healing and regeneration are stimulated in this state, and that is why deep restorative sleep is so essential to the healing process • Deep, dreamless sleep, non-REM sleep, unconscious
  • 9.
    THETA WAVES (4TO 7 HZ) • Occur most often in sleep but are also dominant in deep meditation • Dreaming, deep meditation, daydreaming • Our gateway to learning, memory, and intuition • Our senses are withdrawn from the external world and focused on signals originating from within • In theta we are in a dream; vivid imagery, intuition and information beyond our normal conscious awareness • When we’re doing a task that is so automatic that the mind can disengage from it e.g. brushing teeth, driving a car long distance, showering, or coding in Java • Intuitive, creative, recall, fantasy, imaginary, dream
  • 10.
    ALPHA WAVES (8TO 12 HZ) • Alpha brainwaves occur during quietly flowing thoughts, but not quite meditation • Alpha waves detected when eyes are closed and feeling relaxed, and activities such as: • Yoga, just before falling asleep, being creative and artistic • Alpha is the resting state for the brain: Relaxed (but not drowsy), tranquil, conscious • Alpha waves aid overall mental coordination, calmness, alertness, mind/body integration and learning • A person who has completed a task and sits down to rest is often in an alpha state • A person who takes time out to reflect or meditate is usually in an alpha state • A person who takes a break from a conference and walks in the garden is often in an alpha state
  • 11.
    BETA WAVES (12TO 30 HZ) • Our normal waking state of consciousness, alert, active thinking • Active conversation, decision making, problem solving, focusing on a task, learning a new concept, debate • Beta brainwaves dominate our normal waking state of consciousness when attention is directed towards cognitive tasks and the outside world • Beta is a ‘fast’ activity, present when we are alert, attentive, engaged in problem solving, judgment, decision making, or focused mental activity • Beta brainwaves are further divided into three bands; • Lo-Beta (Beta1, 12-15Hz) can be thought of as a 'fast idle', or musing, relaxed yet focused • Midrange Beta (Beta2, 16-20Hz) is high engagement or actively figuring something out, aware of self & surroundings, thinking • Hi-Beta (Beta3, 20-30Hz) is highly complex thought, integrating new experiences, high anxiety, or excitement, alertness, agitation • Continual high frequency processing is not a very efficient way to run the brain, as it takes a tremendous amount of energy.
  • 12.
    GAMMA WAVES (30TO 100 HZ) • The fastest of brain waves (high frequency, like a flute), and relate to simultaneous processing of information from different brain areas • The most subtle of the brainwave frequencies, the mind has to be quiet to access gamma • Gamma was dismissed as 'spare brain noise' until researchers discovered it was highly active when in states of universal love, altruism, and the ‘higher virtues’ • Gamma is also above the frequency of neuronal firing, so how it is generated remains a mystery • It is speculated that gamma rhythms modulate perception and consciousness, and that a greater presence of gamma relates to expanded consciousness and spiritual emergence Gamma brainwaves have been observed to be much stronger and more regularly observed in very long-term meditators including Buddhist Monks.
  • 13.
    All together now! •Research has shown that although one brainwave state may predominate at any given time, depending on the activity level of the individual, the remaining three brain states are present in the mix of brainwaves at all times • In other words, while somebody is an aroused state and exhibiting a beta brainwave pattern, there also exists in that person's brain a component of alpha, theta and delta, even though these may be present only at the trace level • For example, you can see meditational state listed under more than one brainwave type • One benefit of measuring that big shiny brain of yours is to understand what effects your state of mind, and be able to exercise the state that you find beneficial
  • 14.
    Some projects andproducts • The first use of NeuroSky's technology was by the USA Olympic Archery team to improve their game • Musinaut is a Paris-based music company that plans to use the device to create interactive music technology that controls a user's music based on their thoughts and moods. • Mindflex: The MindFlex was produced in conjunction with Mattel and released for the 2009 Christmas season. It is a game in which players lift a ball by concentrating and move it through a maze. • Star Wars Force Trainer: The Star Wars Force Trainer was produced in conjunction with Uncle Milton inc. and released for the 2009 Christmas season. It is a game in which players lift a ball by concentrating. • MindRDR: MindRDR is a Google Glass application created by This Place that connects a Neurosky MindWave sensor to Google Glass to allow concentration and relaxation outputs from the biosensor to take and share photos on Twitter and Facebook without physical or verbal interaction.
  • 15.
  • 16.
  • 17.
    def read_and_fix_data(path): """ Read csvfile, normalize timestamp to a new column, Time, so that timescale is comparable """ df = pd.read_csv(path,header=0) df['Timestamp'] = pd.to_datetime(df['Timestamp']).astype('int64') max_a = df.Timestamp.max() min_a = df.Timestamp.min() min_norm = -1 max_norm =1 df['Time'] = (df.Timestamp- min_a) *(max_norm - min_norm) / (max_a-min_a) + min_norm return df
  • 19.
    Moar • https://www.youtube.com/watch?v=rSQNi5sAwuc (Moveanothers hand with power of mind) • https://aip.scitation.org/doi/pdf/10.1063/1.5132449 (Mindwave Mobile as wheelchair controller) • https://www.hackster.io/cnns4eegs/deep-learning-for-seizure-prediction-wearable-5ad2d3 • https://www.hackster.io/ayushkapur10/3d-printed-eeg-controlled-prosthetic-arm-2c9104 • https://www.hackster.io/andrewstein/brain-controlled-hue-light-via-octoblu-daa215 • http://hex-machina.com/hw/mindbullets • https://learn.sparkfun.com/tutorials/hackers-in-residence---hacking-mindwave-mobile/all • http://developer.neurosky.com/docs/doku.php?id=projects • http://www.justintimmer.com/reading-my-mind-with-an-eeg-headset-a-product-review-of- the-mindwave-mobile-by-neurosky/
  • 20.
    Start hacking! ARTO SANTALA SoftwareArchitect, Solita Oy arto.santala@solita.fi https://github.com/crystoll/projectillithid

Editor's Notes

  • #21 https://twitter.com/SolitaOy https://www.facebook.com/Solita https://www.linkedin.com/company/solita-oy/ https://www.youtube.com/user/SolitaOy https://www.youtube.com/playlist?list=PLsaEf6-Yla5oOMz04xXQ-NsVnYqPCcmZH