Affordance is Play
Affordance as a Function of Intent and Action?
Markov Decision Process (MDP) is a loop:
- You (or agent) in some situation (personal and world state).
- You (or agent) choose an action.
- The world reacts (new state + reward).
- Wash and repeat.
Gibson (1977) defined affordances as different possibilities of action that the environment affords to an agent.
Affordance is Play
In the real world, we discover affordances not by planning but by playing with possibilities.
Affordance, in this sense, is not about achieving an outcome. It is about staying alive while experimenting with the world.
It defines the space within which we can change the game's parameters without getting hurt.
It is the Most Serious Matter
Play, then, is not the opposite of seriousness; it is the method by which organisms map the terrain of survival. Through play, we learn about the world’s resistance and our own capabilities. The outcome of play is not a single intent achieved, but a widening of understanding; an embodied sense of what is possible.
The Definition
If I were to define affordance, I would not say it is “the subset of state–action pairs that fulfill intent.” I would say:Affordance is the set of game parameters within which an agent can safely play and explore the outcomes that bring meaningful experiences.
It is the field of viable transformation, the space where curiosity meets consequence and both survive the encounter.
Mathematics
Let’s assume hazard H is a function that indicates how risky it is to take a particular action a in a given state s.
$$ H(s,a) \le h_{max} $$
If the hazard is below some acceptable threshold \( h_{max} \),
then this action is considered safe enough to play with.
In everyday terms: “Don’t jump higher than you can land safely.”
Now we introduce a second measure, feedback richness F. It describes how much change or learning happens when you take an action a. We can compute it by looking at the expected difference between the current state s and the next state s' after performing action a.
$$ F(s,a) = \mathrm{E}_{s' \sim P(\cdot \mid s,a)} \left[ D(s,s') \right] $$| Symbol | Meaning |
|---|---|
| \( s \) | The current state of the agent. |
| \( a \) | The action taken in that state. |
| \( s' \) | Read “s-prime” — the next state that results after performing the action. |
| \( P(s' \mid s,a) \) | The transition probability: how likely it is to reach each possible next state \( s' \) when taking action \( a \) in state \( s \). |
| \( D(s,s') \) | A difference function measuring how much the world or the agent’s perception changes between \( s \) and \( s' \); it could represent distance, novelty, or information gain. |
| \( \mathbb{E}_{s' \sim P(s' \mid s,a)}[\cdot] \) | The expected value — the average of that difference over all possible next states following from \( s,a \). |
The formula asks: “On average, how different is the world after I act?”
If nothing changes (like bouncing on a log that won’t move), feedback is low. If something new happens (the world reacts in an interesting way), feedback is high.
So \( F \) measures how informative or “fun” the action is: how much it teaches the agent about the world.
The affordance of play is the set of all state–action pairs that are both safe and interesting:
$$ A_{play} = \{ (s,a) \in S \times A \mid H(s,a) \le h_{max},\ F(s,a) \ge f_{min} \} $$In plain language: An action is “playable” if it won’t hurt you and it’s worth doing because you might learn something new. It defines the zone of viable exploration; the sweet spot between boredom and danger.
Next, we define the play policy: the way an agent chooses its actions to keep playing safely and learning effectively.
$$ \pi_{play}^{*} = \arg\max_{\pi} E\!\left[ \sum_{t=0}^{T} \gamma^{t} F(s_t,a_t) \right] \quad \text{s.t.} \quad H(s_t,a_t) \le h_{max},\ \forall t $$| Symbol | Meaning |
|---|---|
| \( \pi \) | A policy — a rule or function that tells the agent which action to take in each state. |
| \( \pi_{\text{play}}^{*} \) | The best (optimal) play policy that satisfies the safety rule. |
| \( \arg\max_{\pi} \) | Find the policy that gives the maximum possible value. |
| \( \mathbb{E}[\cdot] \) | The expected value, i.e., the average over all possible outcomes. |
| \( \sum_{t=0}^{T} \) | A sum over time steps from the beginning (\(t=0\)) until some horizon \(T\). |
| \( \gamma^{t} \) | A discount factor (0 < \( \gamma \) < 1) that slightly reduces the importance of far-future experiences; it models our natural tendency to value the present more than the distant future. |
| \( F(s_t,a_t) \) | Feedback richness — how much the agent learns from taking action \(a_t\) in state \(s_t\). |
| \( H(s_t,a_t) \) | Hazard — the expected risk or potential harm of taking that action. |
| \( h_{\max} \) | The maximum acceptable hazard, the safety limit. |
| \( H(s_t,a_t) \le h_{\max} \) | The safety constraint: every action must remain below the danger threshold. |
This formula means the agent tries to maximize total feedback over time (it wants the richest learning experience possible) while keeping every action within the safety boundary.
In other words: “Explore as much as you can without getting hurt.”
The factor \( \gamma \) (gamma) discounts future feedback slightly, just as we naturally prefer immediate experiences to distant ones.
For comparison, the classical reinforcement learning policy focuses purely on reward:
$$ \pi^{*} = \arg\max_{\pi} E\!\left[ \sum_{t=0}^{\infty} \gamma^{t} r(s_t,a_t) \right] $$Traditional Reinforcement Learning (RL) agents chase rewards \( r \).
A playful agent instead chases understanding \( F \), which signals curiosity, while respecting a safety boundary \( H \).
It is not optimizing for success but for continued participation.
Application for Machine Learning
In practical machine learning, this perspective turns into a guide for building better agents. Instead of rewarding an agent only when it achieves a fixed goal, we can encourage it to discover where it can play safely. The agent learns the boundaries of its world and the regions that respond richly to its actions, rather than blindly optimizing for external rewards.
In reinforcement learning terms, the agent can maintain two learned functions: a hazard model \( H(s,a) \) estimating the probability of failure or damage, and a feedback model \( F(s,a) \) estimating the expected amount of new information or improvement gained from an action. By combining them, the agent can create its own playground of exploration \( A_{play} \) and focus on safe and informative actions.
Such agents do not merely chase rewards; they evolve through curiosity.
They learn the structure of their environment by interacting with it, not just memorizing outcomes. This approach aligns machine learning more closely with how humans and animals learn: through playful experimentation, through testing what can be changed without harm. It is learning as a continuous dance with uncertainty; an art of exploring the edge of safety where discovery happens.
References
-
“A Theory of Affordances in Reinforcement Learning”, Khimya Khetarpal et al.
https://arxiv.org/pdf/2006.15085
Basic lines in Japanese calligraphy (shodō 書道)
In the third lesson of my shodō 書道, I have practiced only drawing lines.
It is more difficult than it appears. In Europe, we are used to writing with a hand on paper, even with an ink fountain pen; there is support.
In Japanese calligraphy, shodō 書道, you sit with your back straight and hold the ink brush (fude 筆) vertically. The strokes use various brush pressures, but they are very prescribed in direction.
墨 sumi: The black ink used in calligraphy.
聿 itsu: This is a more classical kanji that means explicitly "writing brush" and is often used in compound words related to writing.
永
- 側 () - A dot
- 勒 () - A horizontal stroke
- 努 () - A vertical stroke
- 趯 () - A hook
- 策 () - A horizontal stroke with a right upward ending
- 掠 () - A diagonal stroke to the left
- 啄 () - A short diagonal stroke to the left
- 磔 () - A diagonal stroke to the right
Japanese router joints by takuwoodcraft
Japanese joinery with router and circular saw by @YASUHIROTV
Minimalist Japanese Zen Workbench
Amazing Table Corner
Amazing table corner. No nails, no glue.
Simple foldable chair project
Here is a super simple foldable chair that I would like to make as a lightweight, artistic beauty in simplicity exercise.
Taikyoku Shodan, Nisan, and Sandan
Taikyoku are the first kata many students learn in Shotokan. They were designed by Gichin Funakoshi and his son Yoshitaka to teach the foundation of stance, posture, and basic movement. The pattern follows a simple embusen in the shape of an H, using:
- zenkutsu-dachi,
- gedan-barai,
- uchi-uke
- oi-tsuki
The purpose of kata is practice of techniques and by repetition of well executed moves we gain strength, endurance, speed and muscle memory.
In Shūdōkan (修道館), founded by Kanken Toyama, Taikyoku Shodan keeps its Shotokan roots but carries some key distinctions in philosophy, structure, and execution style.
However, Toyama also incorporated Chinese Ch’uan Fa (拳法) principles,giving Shūdōkan a softer, more circular flavor than the linear rigidity of Shotokan.
Thus, Taikyoku Shodan in Shūdōkan is not just a “beginner drill” but a gatewayto blending hard and soft dynamics.
Technical Differences
Movements: less tension, more flow; hip rotation is present but not exaggerated.
Emphasis: smooth transitionbetween blocks and punches, maintaining zanshin (continuing awareness).
Breathing: coordinated with motion—sometimes more consciously emphasizedthan in Shotokan’s military rhythm.
Pedagogical Role
The kata is used to refine kihon quality and teach mental focus —shudō literally means “the way of self-cultivation.”
Spirit and Meaning
In Shūdōkan, Taikyoku expresses the unity of spirit and form — Toyama emphasized that “technique without heart is empty.” The simplicity of Taikyoku Shodan is meant to reveal the depth of character through precision and intent, not complexity.
Toyama studied under Ankō Itosu and Gichin Funakoshi, so Shūdōkan shares much with early Shotokan.However, Toyama also incorporated Chinese Ch’uan Fa (拳法) principles,giving Shūdōkan a softer, more circular flavor than the linear rigidity of Shotokan.
Thus, Taikyoku Shodan in Shūdōkan is not just a “beginner drill” buta gateway to blending hard and soft dynamics.
Technical Differences
Movements: less tension,more flow; hip rotation is present but not exaggerated.
Emphasis: smooth transition between blocks and punches, maintaining zanshin (continuing awareness).
Breathing: coordinated with motion—sometimes more consciously emphasizedthan in Shotokan’s military rhythm.
Pedagogical Role
The kata is used to refine kihon quality and teach mental focus — shudō literallymeans “the way of self-cultivation.”
Spirit and Meaning
In Shūdōkan, Taikyoku expresses the unity of spirit and form — Toyama emphasized that “technique without heart is empty.” The simplicity of Taikyoku Shodan is meant to reveal the depth of character through precision and intent, not complexity.
Taekwondo and Okinawan karate
My kids decided to betrayed the "family" tradition and (they were) signed up for Taekwondo. The kids' classes are well run, the kids are having fun, and the high kicks are impressive.
Our local school, DMW Martial Arts in Snoqualmie, Washington, was founded in 2008 by Dan Cartan, Marcia Paul, and Warren Spencer. Based on the forms taught (Taegeuk and Koryo), the school likely practices a style used in the Olympics and associated with World Taekwondo (WT). There is an association with Grandmaster Hong Sik Kim, 9th dan, who was teaching in PNW.
Despite being developed in Korea and drawing on native Korean traditions, Taekwondo's modern form was shaped by the influx of Okinawan karate, particularly Shotokan, into Korea during and after the Japanese occupation (1910–1945).
Many of the Korean masters who founded the original Taekwondo schools (known as kwans) had studied Japanese and Okinawan martial arts, including Shotokan karate, while living in Japan during the occupation period.
Borrowing of forms (poomsae): Early Taekwondo forms, or hyung, were based on or directly adapted from Shotokan karate's kata. For instance, some Shotokan kata, like Bassai and Tekki, were practiced in early Taekwondo under Koreanized names.
The linear striking techniques and belt-ranking system used in Taekwondo were directly inherited from karate. The white uniform, or dobok, is also derived from the karate gi.
After the end of the Japanese occupation, there was a strong movement to re-establish the Korean national identity. Early leaders of Taekwondo deliberately modified and rebranded these techniques to separate the Korean martial art from its Japanese influences. This included creating new forms (poomsae) and officially coining the term "Taekwondo" in 1955.
| Master | School (Kwan) | Karate Training |
|---|---|---|
| Won Kuk Lee | Chung Do Kwan | Studied Shotokan karate under Gichin and Gigō Funakoshi while attending university in Japan. He brought karate to Korea in 1944. |
| Choi Hong Hi | Oh Do Kwan and International Taekwon-Do Federation (ITF) | Studied Shotokan karate while in Japan and held a 2nd dan black belt. He later denied studying Taekkyon, an ancient Korean art, and admitted that karate was the only martial arts influence he could verify. |
| Ro Byung Jik | Song Moo Kwan | Studied Shotokan karate in Japan, attending the same university as Won Kuk Lee. |
| Byung In Yoon | Chang Moo Kwan | Studied Shudokan karate directly under its founder, Toyama Kanken. |
| Kae Byung Yun | Ji Do Kwan | Studied Shudokan karate and later Shito-ryu karate, from which he received a 7th dan certificate. |
| Hwang Kee | Moo Duk Kwan (Tang Soo Do) | Studied martial arts by reading books on Okinawan karate, in addition to Chinese fighting systems. The original forms (poomsae) and techniques of his Tang Soo Do style were derived from Shotokan karate. |
Kanji 气 (き,"ki") 气+米 = 氣 > 気
Today, I am on day two of my kanji calligraphy practice (shodō).
My name, 宇気, Uki, joins two characters that make an unusual yet poetic meaning.
Kanji 宇, Japanese: u; Chinese: yǔ, meaning expanse of space, universe, shelter, and the structure of the heavens. The component radical 宀 means a roof over a supporting framework.
Kanji 気, Japanese: ki; Chinese: qi, descended from the older form 氣, depicted as vapors rising from rice, the visible breath of life offered to the gods. The meaning is offering, mind, spirit, vital energy, "ki/chi" in various fighting styles.
In time, its form simplified to 気, the simplified component radical 乂 means to govern, control, or harmonize.
In my interpretation, 気 represents the energy of a fireplace. There are slanted horizontal 3 strokes representing heat waves rising from the fireplace. The radical 乂 represents crossing sticks of the firewood stack.
Japanese joinery (木組み , kigumi), joints 仕口 (shikuchi)
I have been fascinated by Japanese joinery (木組み, kigumi) for decades, admiring the precision and quiet beauty of wood fitting wood without nails or glue. The log houses of the highlanders of my birthplace used the joinery as well. I remember my friend buying a costly Japanese bed that could be easily assembled and disassembled. I always wanted the house and furniture to be in a traditional Japanese style.
Now that I finally have my own house with a workbench, I can begin exploring this hobby.
There are many books on Japanese joinery, especially in Japanese, on eBay, but I did not find any box sets. My plan is to start by making a miniature joinery box set, scaled-down examples that demonstrate the logic and craftsmanship behind full-sized structures. They take up little space, waste little wood, and can be disassembled for study.
Choosing Woods for Practice
Living in the United States, I don’t have access to traditional Japanese timbers like hinoki (檜, Japanese cypress) or sugi (杉, Japanese cedar), but several local species work surprisingly well:
- Poplar is a first choice for learning. Smooth, consistent texture and inexpensive. Cuts cleanly and holds fine edges, perfect for small kigumi examples.
- Alder is slightly harder than poplar with a warm tone. Its fine grain allows tight, but reversible, fits, making it suitable for dry-fit joinery.
- Western Red Cedar is light, aromatic, and reminiscent of sugi, but it can splinter if too dry.
- Pine is ideal for early practice. It planes easily, responds well to chisels, and is widely available. Eastern white pine is especially good.
- Maple is a dense, beautiful hardwood. I’ll save it for when my hand tools and patience are ready for precision-level work.
Staining and Finish
At first, I won’t use stain. I want to see the true contrast of grain and color between different woods—it helps me understand how the pieces lock together. Later, when I build display joints, I’ll finish them with natural oil or wax, not colored stain. The goal is to highlight the fibers and feel the texture as it was meant to be.
Keeping the Joints Reversible
Japanese joinery often relies on the balance of friction and geometry, so the parts can be taken apart. You should be able to disassemble the joints using a wooden dowel and a mallet.
For the study, I’ll:
- Avoid glue altogether.
- Lightly wax the sliding faces.
- Mark each pair with a small, hidden symbol for reassembly (kigumi-mei, 組み名, “joinery name mark”).
I may combine this with my practice of shodo (calligraphy).
Starting the Journey
I really like the examples of Japanese joinery here:
- 雇い枘差し仕口 Yatoi-hozo-sashi-shikuchi
- https://x.com/TheJoinery_jp/status/835462810599448576
- 竿車知継ぎ Sao-shachi-tsugi
- https://x.com/TheJoinery_jp/status/797275288753160192
- 蟻形差し組み仕口Ari-gata-sashi-gumi-shikuchi
- https://x.com/TheJoinery_jp/status/819748493468106753
- 井桁仕口 (Igeta-shikuchi)
- https://x.com/TheJoinery_jp/status/801065367011401728
- 蟻形釣り枘仕口 Arigata-tsuri-hozo-shikuchi
- https://x.com/TheJoinery_jp/status/795952289479434240
- 蟻二枚枘差し仕口 Ari-nimai-hozo-sashi-shikuchi
- https://x.com/TheJoinery_jp/status/794542552460378112
My approach will stay simple: study and cut each joint by hand. I’ll rely only on hand tools —saws, chisels, marking knives —and on patience. No shortcuts, no power tools at first. The goal is not speed but understanding how the wood behaves, and how each joint holds together.
- 仕口 (shikuchi) literally means _joint_ or _connection_ in carpentry, how two pieces of wood are fitted together.
- 仕 (shi) means “to do” or “to make.”
- 口 (kuchi) means “mouth” or “opening.”
Together, 仕口 (shikuchi) describes the way two elements meet and interlock, a functional term for a wood joint, much like “joint” or “connection” in English.
In summary:
- shikuchi (仕口) = joint or joinery connection
- tsugi (継ぎ) = joint in the sense of _splicing or extending_ wood (end-to-end)
- hozo (ほぞ / 枘) = tenon or projecting part inserted into another piece
Link GitHub .md Docs as Obsidian Directory
If your Markdown files live in a GitHub repository but you want to edit them directly in Obsidian, you can create a symbolic link.
This allows Obsidian to treat the remote folder as part of your vault without copying files.
Example (macOS)
```bash
ln -s "/Users/user_name/.../REPO/DNN-book/chapters" "/Users/user_name/Obsidian/DNN-book"
Recurrent Neural Network (RNN) cell in PyTorch
code: https://github.com/UkiDLucas/DNN-book
import torch
import torch.nn as nn
# pick device (use "mps" on Apple Silicon;
# macOS Metal hardware acceleration
device = torch.device("mps" if torch.backends.mps.is_available() else "cpu")
class MyRNNCell(nn.Module):# rnn_units: number of hidden neurons
def __init__(self, rnn_units, input_dim, output_dim):super().__init__()# weight matrices, * 0.01 scales the random weight initialization to small valuesself.W_xh = nn.Parameter(torch.randn(rnn_units, input_dim) * 0.01)self.W_hh = nn.Parameter(torch.randn(rnn_units, rnn_units) * 0.01)self.W_hy = nn.Parameter(torch.randn(output_dim, rnn_units) * 0.01)# hidden state h initialized to zerosself.register_buffer("h", torch.zeros(rnn_units, 1))def forward(self, x):# x is shape [input_dim, 1]self.h = torch.tanh(self.W_hh @ self.h + self.W_xh @ x)y = self.W_hy @ self.hreturn y, self.h# minimal usage example
if __name__ == "__main__":rnn = MyRNNCell(rnn_units=16, input_dim=8, output_dim=4).to(device)x_t = torch.randn(8, 1, device=device) # input vector at time ty_t, h_t = rnn(x_t)print(y_t.shape, h_t.shape) # torch.Size([4, 1]) torch.Size([16, 1])
A practical use of this minimal RNN cell is to predict or generate sequential data, where each step depends on the previous one.
For example:
-
Time series forecasting: Feed in one value at a time (like daily temperatures or stock prices) and train it to predict the next value.
-
Character-level text generation: Convert characters to one-hot vectors, feed them sequentially, and let the RNN learn to predict the next character.
-
Signal smoothing or sensor prediction: Use it to process sequential readings (like a boat’s wind and wave sensors) to predict future conditions.
Even though it’s a tiny model, it demonstrates the whole idea: maintaining internal memory (h) to connect past inputs with future outputs.
Various RNN configurations:
- single input > RNN cell > single result for binary classification
- many inputs > many RNN cells > single output: sentiment classification
- single input > many RNN cells > many outputs: text generation, image captions
- many inputs > many RNN cells > many outputs: translation, music generation
Think of an RNN as a storyteller that remembers what has already been said while deciding what comes next. Each RNN cell is like one frame in a film reel—receiving new input, updating its memory, and passing that memory forward. When you connect many cells in series, the network forms a chain of thought through time: it doesn’t see the whole story at once but recalls what just happened. In a simple one-to-one setup, it’s like hearing a single word and deciding “yes” or “no.” With many inputs feeding into a single output, it listens to a whole sentence before forming an opinion, such as judging sentiment. With one input producing many outputs, it’s as if the RNN takes one idea and tells a whole story, step by step. And when many inputs produce many outputs, it becomes a fluent translator or composer—listening, remembering, and responding continuously.
References:
Miniature Bonsai by 善福寺まこと / Makoto Zenpukuji
Post Scriptum
I am preparing to cancel the subscription to the e-mail newsletter that sends my articles.
Follow me on:
X.com (Twitter)
Google Scholar
Popular Recent Posts
-
Keishin Kata (敬心形) of Shobudo (正武道) karate kei (敬) respect, reverence, or honor someone or something shin (心) heart or mind kata (形) fo...
-
Before arriving in Okinawa, several experiences prepared me for what I would eventually learn there. Karate was the first. It introduced me ...
-
I came across Ruri Ohama mentioning a book by Takafumi Horie and Yoichi Ochiai titled: “Job Atlas for 10 Years From Now. How Will You Live i...
-
Please look at the newer post: http://ukitech.blogspot.com/2009/09/eclipse-35-galileo-and-gwt-m2-svn.html 1) Upload a new version of Eclipse...
-
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space or Unable to execute dex: Java heap space Java h...
-
Step 1: Register you app with Facebook. Sign in to Facebook using your standard credentials. Navigate to http://www.facebook.com/developer...
-
http://code.google.com/apis/socialgraph/
-
In this tutorial we will overview integration basics of Android Studio and Gradle build tools.
Most Popular Articles
-
Affordance as a Function of Intent and Action? As a person passionate about Behavioral Sciences, I found myself unable to shake the impre...
-
Step 1: Register you app with Facebook. Sign in to Facebook using your standard credentials. Navigate to http://www.facebook.com/developer...
-
Please look at the newer post: http://ukitech.blogspot.com/2009/09/eclipse-35-galileo-and-gwt-m2-svn.html 1) Upload a new version of Eclipse...
-
Creating Android ROS nodes to: - add control UI (HMI) - utilize existing phone sensors: -- gyroscope -- GPS -- compass -- camera - do...
-
In this tutorial we will learn how to install the Intellij IDEA database plugin. Start with opening Settings > search for plugins ...
-
Installing TuriCreate on Python 3.6 Anaconda Environment 1) Check what Python version Apple Turi Create supports https://github.com/ap...
-
In this tutorial we will overview integration basics of Android Studio and Gradle build tools.
-
This tutorial shows you how to change the code lower/upper case of code in Android Studio.
-
ImportError : No module named 'sklearn.model_selection' Before doing the embarrassing things I did below, read this: Setting Jupy...
-
This minimal PyTorch example implements a custom recurrent neural network (RNN) cell from first principles, showing how sequence memory eme...















