[T-994] Train your brain with a Japanese train (Python script inside)

Dear Rine,

While we’re waiting for the train from this headline to arrive, let me fill you in with some context.

On the same day we made our accountability deal, @iuliu (from our Discord channel) posted a recipe for peak brain performance, as prescribed by an elite Stanford neuroscientist. Have you seen it?

In the past six days I applied this recipe to stampede through the N5 deck.

Here’s what @Iulu posted:

Andrew Huberman studies neurobiology. He shares insights from his field applied to daily life.

The episode he talks about this protocol: https://youtu.be/nwSkFq4tyC0?t=2980

1.

Focused learning/creative work session for 90 minutes

** Allow 10-15 minutes of not being so focused.** Your mind will ramp-up in being absorbed in the topic/task. Then, 60 minutes of focus. Ideally, it should feel like strain. Good learning is enjoyable, but it also takes focused effort.

The last 10-15 minutes your brain won’t have the neuro-chemistry required for focus anymore. It will have used up it’s resources and your attention will start wandering. At that point it’s a good time to actively recall what you learned in the past session, writing any notes about connections you make.

Interjection: In my case, I use these last 15 minutes of exhausted neuro-chemistry to go through the final drill. It contains the items I went through in the preceding 60 mins.

Moving on, Andrew explains how to replenish your neuro-chemistry for another bout of useful work:

  1. 20 minutes of what he calls Non-Sleep Deep Rest (NSDR)

Immediately after your learning session, you want enter a mode of deep relaxation for about 20 minutes. You can lay down in the yoga ‘corpse’ pose, relax your body, and disconnect from any analysis of the past, future. Just focus on relaxing. Personally, I turn on an app that has sounds of a forest with birds and a stream flowing. I just imagine I’m in nature and relaxing, not a care in the world. This will turn off a mode of your mind called ‘duration-path-outcome’ analysis, which is very costly on chemical resources. You’ll regenerate your ability for you to focus, turn on your brains diffuse mode thinking (for creative problem solving). Also, Huberman cites a study that showed a period of rest immediately following a learning bout in itself increases learning.

The train from the headline is pretty close now so let me get to the point:

I have a peculiar way of reaching that NSDR state

It’s based on what the same Andrew Hubberman said in another place about a state called optic flow. Here’s an extract I have saved in my *.kno:

When you move through space, whether walking, running, or driving, you’re in what’s called optic flow. Things are moving past your retina at varying speed, depending on how fast you’re moving, but your brain has knowledge of how fast you’re moving. It cancels out the movement in a way that says, okay, these objects aren’t moving past me. I’m moving past them. All of this boils down to a set of circuits in the brain and body that make it so that when we’re moving through space, it has this property of relaxing us and giving us a sensation that is somewhat rewarding. And so what this translates to is at least once a day, get out and move. Optic flow doesn’t have to be fast. It can be at slow speeds. Ideally, it’s variable speeds, but this, I believe, underlies the sensation, the both calming and invigorating and kind of replenishing feelings that we get from taking a bike ride or a long run or swimming, for that matter.

Which brings me to the train from the headline. Here it is arriving just in time to deliver my point (how convenient).

Train ride videos induce the brain-restoring benefits of the optic flow state

You know the replenishing feeling Huberman speaks of?

That day-dreamy state you fall into whenever you’re riding window-seat on a train or as a passenger in a car cruising down a highway?

Youtube is full of train ride videos in stunning 4k that do a good job of simulating the experience.

At least that’s my hunch. A hunch from a non-elite non-Stanford non-neuroscientist. Take it for what it’s worth.

But anyway, since we are learning Japanese, it’s only right to pick train rides through Japan’s Blade Runner-esque city scapes or the cherry-blossom-dotted country side.

Word of warning though –

Unfortunately, you can’t just go on Youtube and pick your favorite train channel

It’s too risky.

As soon as you open Youtube’s front page, the irresistible current of its recommendations algorithm will shower you with stimulating thumbnails. You’re likely to click on one and get swept away who knows where.

You’d end up watching an exciting video that would cancel out the brain gains Huberman promised us.


You need to dodge the YT interface and jump straight into – never in front of – a moving train!

For this I jotted a few lines of Python.

It just prints a string to my shell to launch mpv player with a random clip from a list. The clip plays for a set amount, then mpv shuts down (so you can disembark the train return to your main activity).

Because it randomly picks a clip from the list, you also get the psychological benefit of variable rewards. You know, you get that extra squirt of dopamine juice because your brain is not 100% sure what kind of reward it’ll get.

Anyway, here’s the script, if you can call it that lol:


import os
import random

trains = [
        'https://youtu.be/IIknNdF07Ps',
        'https://youtu.be/hTaXssXhcNY',
        'https://youtu.be/DHVBAlof0Sc',
        'https://youtu.be/Iwb_u0sciaY',
        'https://youtu.be/xoLSNzPrSv4',
        'https://youtu.be/rp8_CWO0i1c',
        'https://youtu.be/RpASS7on1SE',
        'https://youtu.be/ruDXw0VEdmc'
        'https://youtu.be/_EUyEHfog8o'
        ]

clip = trains[random.randint(0, int(len(trains) - 1))]

start = random.randint(0,80)

os.system(
        str(
            "mpv " 
            + "'" 
            + clip
            + "'"
            + " --profile=1080p "
            + "--fs "
            + "--start=" + str(start) + "% "
            + "--length=420"
            )
        )

# The damn mpv config file is at
# /usr/local/etc/mpv/mpv.conf

The settings in my mpv.conf are as follows:

ytdl-raw-options=ignore-config=  # fixes issue with youtube-dl < 2018.04.09

[1080p]
ytdl-format=bestvideo[height<=?1080]+bestaudio/best

The current selection of clips is a mix of train rides and walks. But the best selection of train rides I ran into is on a channel called HKASAMA

Anyway, I’m showing you this just in case you get some ideas on how we could build on it. Maybe to create a kind of immersion roulette that launches videos on a single button click. Whatever lowers the resistance, you know.

OK, here’s the boiler plate section:

What I did yesterday

What I did today

I’m reporting later than my workweek usual so I already did what I wanted to do today:

Any obstacles