Seventeen, in Istanbul
I was 17 and doing the IB Diploma in Istanbul. If you haven’t heard of it, the IB (International Baccalaureate) Diploma is a two-year pre-university program taught in schools around the world. It’s amazing, and it’s hard. You can’t believe how much a teenager gets pushed to think critically. And for me, all of it was in English, my second language. In IB Math SL, exams alone don’t finish the course. You also write the Exploration: a short paper where you pick a piece of mathematics and investigate it on your own. It counts for 20% of your final grade.
I picked Markov chains. Honestly, there was no big reason. I was fascinated by the graphs: circles connected by arrows, each arrow carrying a probability score.
It wasn’t easy. I remember being quite challenged by it. I was reading traditional math books full of definitions and matrices, trying to find a real case where I could explain them and actually use them. For a while, I was a bit lost.
So what is a Markov chain?
A Markov chain is a system that jumps between states. The next step depends only on where you are now, not on how you got there. That’s the whole rule. Mathematicians call it “memoryless.”
Take Istanbul weather, simplified to two states: sunny and rainy. Drawn as a graph:

Istanbul weather as a Markov chain, 2 states
A sunny day stays sunny 80% of the time and turns rainy 20% of the time. A rainy day turns sunny 40% of the time and stays rainy 60%.
To guess tomorrow, you only need today. Last week doesn’t matter.
Now the fun part. Let this run for a long time, and about two out of three days end up sunny. It doesn’t matter whether you start on a sunny day or a rainy one. Why 2/3? In the long run, the traffic between the two states has to balance. 20% of sunny days turn rainy, and 40% of rainy days turn sunny. For those flows to be equal, sunny days must be twice as common as rainy ones.

computed from the weather chain above, 8 days ahead
Within about a week, the two lines meet. Where you started stops mattering.
That long-run balance is called the stationary distribution.
Years later, they’re back (for me)
After that paper, I didn’t touch Markov chains for years. Then I started working in AI, and they kept showing up:
- Language models. In early NLP, n-gram models were Markov chains: they guess the next word from only the last few words. Today’s LLMs grew from the same next-word idea, but they read thousands of words of context, so they’re much more than a Markov chain.
- Recommender systems. A simple baseline asks: after this course, which one do learners usually take next? If 60% of people who finish Intro to Python move on to Data Structures, that’s the top suggestion. Same idea as the weather, with courses instead of days.
- Reinforcement learning. It’s built on Markov decision processes: a Markov chain where an agent also picks actions and gets rewards.
- AI agents. This is where they matter most today. LLM agents take actions: they call tools, browse, write code. When researchers train them with reinforcement learning, they describe the task as a partially observable Markov decision process (POMDP). The agent sees an observation, picks an action, the world moves to a new state, and the loop repeats. “Partially observable” because the agent never sees the full state, only what’s in front of it. Microsoft’s Agent Lightning and AgentGym-RL both start from this setup.
The topic that made a 17-year-old struggle turned out to sit under some of the tools everyone talks about today, and that my career has taken shape around.
How things add up
This is what I like about working across fields. Cognitive science, linguistics, NLP, data science: each step looked like a turn at the time. Then, years later, something from one stage shows up in another and suddenly makes sense. At 17, the Exploration felt like a box to tick to finish a course. Now it feels like an early piece of a puzzle I didn’t know I was building.
There’s a small irony here. Markov chains are memoryless: the next step depends only on where you are now. Careers work the other way. They’re rarely a straight line, and where you go next depends on everything you picked up along the way, even the things you thought you’d forgotten.
tags: markov chains, mathematics, ai, nlp, career