<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/what-s-the-perfect-encoding-how-do-you-know--djzrysr8n" -->

---
title: What&#x27;s the perfect encoding? How do you know? | daily.dev
description: A puzzle about encoding robot movement instructions into binary as efficiently as possible. Given a biased random walk where movements have probabilities of...
canonical: https://daily.dev/posts/what-s-the-perfect-encoding-how-do-you-know--djzrysr8n
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: What&#x27;s the perfect encoding? How do you know? | daily.dev
og:description: A puzzle about encoding robot movement instructions into binary as efficiently as possible. Given a biased random walk where movements have probabilities of...
og:url: https://daily.dev/posts/what-s-the-perfect-encoding-how-do-you-know--djzrysr8n
og:image: https://api.daily.dev/og/posts/dJzRySr8N.png
og:image:alt: What&#x27;s the perfect encoding? How do you know?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# What's the perfect encoding? How do you know?

**[3Blue1Brown](https://daily.dev/sources/3blue1brown)** · 1 min read · 0 upvotes · 0 comments

## Summary

A puzzle about encoding robot movement instructions into binary as efficiently as possible. Given a biased random walk where movements have probabilities of 1/2 (up), 1/4 (down), 1/8 (left), and 1/8 (right), the challenge is to find the minimum bits-per-instruction encoding and prove its optimality. Solving this puzzle is framed as the first step toward independently deriving the concept of Shannon entropy, which is the foundation of information theory and data compression.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=7L_eTem1SQ4>

## Similar posts on daily.dev

- [Shannon Entropy: How to Measure Information Mathematically](https://daily.dev/posts/shannon-entropy-how-to-measure-information-mathematically-scq2sx5if) · The Palindrome · 3 upvotes · 0 comments
- [Writing a competitive BZip2 encoder in Ada from scratch in a few days - part 3: entropy \(with AI/Machine Learning\!\)](https://daily.dev/posts/writing-a-competitive-bzip2-encoder-in-ada-from-scratch-in-a-few-days---part-3-entropy-with-ai-mac-lkd6ensys) · Hacker News · 1 upvotes · 1 comments
- [Using Information Entropy To Make Choices / Choose Experiments](https://daily.dev/posts/using-information-entropy-to-make-choices-choose-experiments-c8selwyds) · Bottom of the sea · 1 upvotes · 0 comments

---

Tags: [#compression](https://daily.dev/tags/compression)

[View this post on daily.dev](https://daily.dev/posts/what-s-the-perfect-encoding-how-do-you-know--djzrysr8n)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"What's the perfect encoding? How do you know?","url":"https://daily.dev/posts/what-s-the-perfect-encoding-how-do-you-know--djzrysr8n","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/what-s-the-perfect-encoding-how-do-you-know--djzrysr8n"},"datePublished":"2026-06-10T13:42:38.320Z","dateModified":"2026-06-10T13:42:58.576Z","description":"A puzzle about encoding robot movement instructions into binary as efficiently as possible. Given a biased random walk where movements have probabilities of...","image":"https://i.ytimg.com/vi/7L_eTem1SQ4/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/7L_eTem1SQ4/sddefault.jpg","isAccessibleForFree":true,"articleSection":"3Blue1Brown","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"3Blue1Brown","logo":"https://media.daily.dev/image/upload/s--rovuuMEM--/f_auto/v1713542252/logos/3blue1brown","url":"https://daily.dev/sources/3blue1brown"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/what-s-the-perfect-encoding-how-do-you-know--djzrysr8n","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"compression","timeRequired":"PT1M","video":{"@type":"VideoObject","name":"What's the perfect encoding? How do you know?","description":"A puzzle about encoding robot movement instructions into binary as efficiently as possible. Given a biased random walk where movements have probabilities of...","thumbnailUrl":"https://i.ytimg.com/vi/7L_eTem1SQ4/sddefault.jpg","uploadDate":"2026-06-10T13:42:38.320Z","duration":"PT1M","url":"https://api.daily.dev/r/dJzRySr8N","embedUrl":"https://www.youtube.com/embed/7L_eTem1SQ4"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"3Blue1Brown","item":"https://daily.dev/sources/3blue1brown"},{"@type":"ListItem","position":3,"name":"What's the perfect encoding? How do you know?"}]}
```

