February 14, 2022

3a1b Top down robotics

< 3a1a What is a robot?

A less common approach in realizing robots is working with the top down method. In contrast, to bottom up robotics, intelligence is not defined as the ability to solve problems, but it is the judgment about the behavior of other who have to solve problems. Top down robotics is equal to implement a referee in software who decides which player has won the game.
The perhaps most often used example for top down evaluation function is available for the 15 puzzle game. The 15 puzzle game is implemented together with the manhattan distance scoring function to measure who far a certain position is away from the goal state. It is up to the player in the game how to minimize the costs.
 

3b Micromouse

< 3a Programming robots with learning from demonstration

The micromouse competition is a concrete example what narrow AI is about. There is a clearly defined goal and even non experts can judge if a robot has reached the goal or not. The details how the robot is doing so can be ignored and it depends on the programmer how to build the robot.
Most examples for successfully created robots are working with a combination of a path planning- plus a steering algorithm. This principle is called bottom up robotics because the robot has to fulfill external goals which is reaching the goal. This paradigm is so widespread used that it is hard to explain potential alternative approaches.
Another, more elaborated strategy to program a micromouse robot, is the top down method. Here the idea is that it doesn't take matter if the robot has reached the goal, but the more interesting question is which score the robot has reached. For example if the robot collides with the wall it gets a -1 reward and if he has reached a waypoint, it gets rewarded with +1.

February 13, 2022

3a1a What is a robot?

< 3a1 Reward function

The terms robot and robotics is used frequently in this blog without giving a precise definition. The only thing which is relative sure is how to create robots from a hardware perspective There is a large industry available which is delivering components like servo motors, microcontrollers and gear boxes. Remote control toy cars can be seen as robots as well.
The more interesting and unsolved problem is how to program such devices. This remains an unsolved problem. What s available today are an endless amount of academic publication about the question how to program micromouse robots, automate something with pick&place robot and make biped robots walk.3 Artificial Intelligence
A relative new and very advanced technique is learning from demonstration. LfD stands in contrast to the former bottom up robotics. Bottom up robotics was invented in the late 1980s and is the blueprint for today's robot challenges. But bottom up robotics is similar to the BEAM method strongly focused on the robot itself and ignores the underlying game rules in which the machine has to operate.

3a1 Reward function

< 3a 

As an entry level task, a robot can be realized by defining a reward function. A reward function isn't about programming the robot itself, but it defines the game. Or to be more specific, it's a scoring algorithm to evaluate the actions of the players within the game. The player's role can be fulfilled by humans and robots as well. For example, in the famous pong game, the scoring mechanism decides, that player1 gets a +1 score if the opponent player wasn't able to block the ball.
A good scoring mechanism provides a continuous reward. The game can be paused at any moment and the algorithm determines, who has won the game with a floating point number precision level. Visualizing a reward function or a cost function as well, is usually done with a potential field which is heat map.

3a Programming robots with learning from demonstration

< 3 Artificial Intelligence

Before a robot can be programmed, there is a need to define what the problem is about. The problem is not to invent yet another programming language or speak to the robot on a hardware level. Also the problem is not about creating databases, or program a servo controller in the assembly language. All these topics are solved already and are getting analyzed by computer experts and programmers. But they are located outside of AI.
The AI side of a robot has to do with keyframe models for animation, defining a reward function and trace human actions with motion capture suits. These tools sound a bit uncommon because they have nothing to do with classical robots. They are located within AI and have to do with how to build future technology.

3 Artificial Intelligence

< About this blog

AI can be spitted into narrow AI and AGI. Narrow AI is easier to grasp because it has to do with building micromouse robots, in game AI, pick&place robots and chatbots.
The interesting situation is, that the subject of AI is large domain within science. Around 5 Million papers and endless amount of books were written about the subject. So the question is not what is AI itself, but the question what was published about the subject.

2 About this blog

This blog is about Artificial Intelligence and robotics. Even it contains articles about programming and operating systems like Linux the focus is on AI. AI means thinking machines, game ai, neural networks, and of course practical applications like building line following robots.
As today, the blog consists of 587 posts. The earliest one were created in 2018 about the Forth language Ext4 filesystem with Forth and typesetting a paper in LaTeX. Typesetting LaTeX for somebody else

February 08, 2022

What is a Zettelkasten?

At foremost an index card is something which has become obsolete since the advent of computers. Index cards were used until the 1960s and where later replaced by electronic databases and word processing software. It is some sort of outdated non electronic medium which can't compete with the Internet.
So it is a bit surprising to recognize that since a while the index card has become a famous technology. Similar to the analog vinyl record there is a huge interest available for this medium. This interest can be seen in sold books about the topic at amazon. The book an position #1 at the bestseller list is about index cards and the underlying Zettelkasten method.
Before we can judge about the topic we have to explain shortly what an index card notetaking system is about. The main principles are that the amount of text for each card is limited to around 500 byte and that the cards are numbered in a complicated system. This elements are visible for electronic and analog Zettelkasten systems as well so we can assume that they are the blueprint for the system.
The main contrast between analog and electronic storage systems, is that analog media are limited in the amount of space. The US-letter format has a size of 8.5x11 inches while an index card has a size of 3x5 inches. This limitation is not available for electronic media. A HTML page doesn't know a border but the width depends on the webbrowser. A window can have a width of 800 pixels, or only 200 pixels on a smartphone. The direct result of a fixed size for example of an index card is, that the amount of bytes which can be stored is limited. Writing an index card by hand results into a size of approximately 500 byte but not more.
Let me give a concrete example to explain why this is important. Suppose a writer likes to a make notes. So he will create a text file, writes the content in the file and after storing the file on the hard drive he will recognize that the file is 300 kb in size.
In contrast, if the same author is using index card to make notes he will recognize quickly that after writing down the first sentence, the index card runs out of space. That means, it is not possible to squeeze 300 kb in a single index card. The logical consequence is to use a second and third card to write the text.
From a writing process this limitation has a huge impact and allows to create a different sort of text. If many index cards are used to store information some sort of sorting mechanism is needed which is mostly a numbering system. The combination of a size limit of 500 byte, plus a numbering system to overcome the bottleneck results into the well known Zettelkasten method.
There are some attempts available to simulate index cards on a computer. In the easiest case, the MS-Word software is used and a table holds the index cards. The table has three columns for the id, title and text and then the user can write the content he likes. If he takes care that each entry has a limit of 500 byte, it is a simulated Zettelkasten.
The open question is how to use such a table to make notes? In the past this problem was never asked, since the advent of the PC there is no such thing like a size limit of 500 bytes. That means in a normal word file it is possible to write down unlimited amount of words or bytes. A carefully formatted table or a physical zettelkasten is a step backward before the advent of the computer. This is what the Zettelkasten community is talking about. They want to explore how note taking was done with a size limit for an index card.
Outliner software
State of the art programs to make notes on a computer are outliner programs. On the first look they have much in common with a Zettelkasten but a closer look will show that the principle works different. In an outliner there are hierarchical sections available, also no space limit is there for a single section. Let me give an example. In a typical outliner the user creates some sections like:
section 1
____section B
section 2
____section 4
____section 5
And then he can write down in each section a text or a table. The principle has much in common with creating files in a folder but an outliner provides the features under single GUI. So it is a very comfortable way in writing. The interesting situation is, that writing with index cards is the opposite of an outliner. Because index cards have limitations while an outliner not.
Or let me formulate it differently. In an outliner there is no need to use a Zettelkasten method or learn how to use index cards.
Sorting cards in a box
Suppose somebody has written text onto a handful of index cars. The next step is to archive the cards in a box. But how? There are at least two competing ways in doing so. One easy to understand option is to give every index card a title and then sort the cards alphabetically.
A more complex approach is to number the cards and then use the number for sorting them. The Zettelkasten method is preferring the second approach. The reason why is a bit complicated to explain. A numbering system is mostly equal to a topic based category system. For example index cards about sport are starting with 1, index cards about music with 2 and so on. The number is used short for a category tree. in case of the Zettelkasten method a more complex system is used in which the numbers are determined on the fly without defining the category tree first. The idea is that a number can't changed later and that the position of the card in the sequential list is important.
The Zettelkasten elite
From the self understanding, the Zettelkasten community has much in common with owners of a fixed gear bicycle. A fixie bike is working different to normal bike. It has no breaks so a certain balancing technique is needed called skidding to stop the bike. A same approach is used in case of a Zettelkasten. If the amount of stored information gets larger a workaround is needed to get in control of the information.
A non zettelkasten user would ask why not simple use a computer to store the notes and use full text search to find something in the database. This is not an option for the community. They are using index cards because they want to manage the disadvantages. Similar to fixed gear bicycles there is a certain sort of social control to handle the situation For example it is not allowed to uses these bicycles on a normal road, and it is strictly forbidden to use a physical zettelkasten to write a book or paper. This rule is so obvious that there is no need to formulate it but everybody knows that Zettelkasten and bicycles without brakes are not wanted anymore. The result is the advent of a subculture which has defined rules in opposite to the mainstream understanding.
Public roads are not the right place for fixed gear bicycles, and libraries are the wrong starting point to make notes on a 3x5 index card. What is used instead to manage information is a modern laptop in combination with an outliner or a citation manager. This is what all the students are using.
There is an easy way to identify which tools are used in mainstream and which not. In so called library prank videos the idea is to create a funny unusual scene and record the reactions of the audience. If a student enters with a physical typewriter a library the other users will smile about it because a typewriter is recognized as an outdated technology. If the same student is using index cards he is using another unusual technology.
The reason why index cards were abandoned from libraries is simple. They have too many disadvantages over notebooks. A single notebook can store more information and is easier to use than a slip card box. Especially the combination of a pen plus index cards is a very costly way in storing information.
Modern information technology
A mainstream compatibly technology to store and retrieve information are laptops. These devices have a huge disc space. They can store easily one gigabyte and more of information. The software allows to search full text in the information so it is a great approach handle high demand. Especially students are using laptops to create bibliographic databases and write down texts.
From a laptop perspective there is no need for index cards. Current programs like outliner and word processing software are more than capable for academic writing. The uprraising of the Zettelkasten method has to be interpreted as some sort of anti-movement which is questioning if full text databases are needed and which alternative information storage options are available.
Footnotes with index cards
There is a youtube video available which explains how to create footnotes. https://www.youtube.com/watch?v=ZNH2Nubcfh4 The Note Card System for Research The idea is to store the footnotes of an acadmic text on index cards. The index card is sometimes called a note card which is short for “footnote card”. And if the paper was written the cards gets archived in a box. This is the basic principle in academic writing.