July 20, 2019

Why learning English is a waste of time


English is sometimes promoted as an easy to learn world language which gives people access to all the academic knowledge in world. All the books, most websites and even movies are created native for an English speaking audience so it makes sense to invest a bit of time in become fluent either in the UK or the US dialect. The problem with learning English is, that the vocabulary is hard to memorize. For example, if a native speaker of French likes to write a letter in English, he needs to lookup a word in the French to English dictionary. For example, he knows that he like to start the sentence with the normal “bonjour”, but what he doesn't know is how to translate this into English.
If somebody is not able to speak the language very well, he doesn't know how to translate a sentence into English. He can ask a bidirectional translater which explains, that bonjour is translated into “good morning” but can the word used in the same way like the french vocabulary? In most cases the answer is no and the French speaker will make his first serious grammar issue and the reader of the letter will recognize, that he is not familiar with the English very well. What he is producing, isn't a letter in fluent English, but his typed in words would read like a beginner translation from French to English.
The better idea is to avoid the foreign language from the beginning and write the entire letter in the native language which is easier to read and will show that the speaker has learned his own language on an expert level. Even if the other side isn't able to understand French he will notice, that the letter was written well and he can ask somebody who can translate it. In the modern age, the translator can be an automatic software.

July 18, 2019

Is Ubuntu Desktop obsolete?


Since a while some blogs have identified Ubuntu Linux as a failed experiment in creating a Linux distribution. They describe a technical backward oriented ecosystem which is no longer fulfill the needs of programmers. Usually the prefered Linux distribution of choice is either Arch Linux or Fedora which are both located near to the upstream. But is this description of Ubuntu Linux right?
No, it's distorting the reality. The reality can be measured in the number of newly published books and the number of newly published academic papers. If we enter the term “Ubuntu Linux” into Google Scholar we will see, that the distribution is healthy and have become lots of new users in the last two years. Most of them are switching from Windows 10 to Ubuntu because they get a powerful shell and lots of programming language without any costs. In contrast, the number of books about Fedora and Arch Linux is lower than ever.
It's correct that the iso image itself, which is the binary file compiled for the x86 architecture, can be switched easily from Ubuntu to Fedora. That means, instead of downloading Ubuntu19.04.iso the enduser can use the wget tool for retrieving the fedora30.iso file. The Fedora one has more features, has the better package manager and gets security updates more quickly. But this is only a detail issue. The Ubuntu iso file works reasonable well and if somebody is a first time Linux user, it's the prefered choice. Because all the documentation were written for Ubuntu but not for Fedora Linux. The more interesting aspect of a Linux operating system isn't the binary file, but the community. And here is Ubuntu the leading platform. Most weblogs in the internet, the askubuntu project and the media coverage as well is focused on Ubuntu Linux. It's the mainstream Open Source operating system and Fedora is compared to Ubuntu a smaller project.
To understand this paradox it's important to introduce the term upstream. Upstream is the place in which the software is created. Which is the gnome sourcecode, the kernel drivers, the systemd scripts and the Libreoffice suite. The upstream is close to Fedora and Red Hat. They are providing the programmers, the servers and they make also the technical decisions about the future. For example, the Gnome3 project which has changed the look and feel of desktop Linux was started by Red Hat, not by Ubuntu. That means, Ubuntu is far away from the upstream, it's located near the enduser. The typical user of askubuntu is mainstream user, who has installed Ubuntu on his computer as a secondary operating system for testing out the steam client and to become familiar with programming. That means, most Ubuntu users are beginner programmers, they come with a little or no background in programming.
Exactly this is the reason why Ubuntu is the leading distribution. Because such users are the future. Most people in the world, have little or no programming skills. They are equal to the majority which is in pure numbers more than a billion users. The question is not how to convince 10 new users to try out Fedora and program an advanced application, but the task is to motivate 100k people to install Ubuntu and write a hello world script in Python. This will bring the Open Source movement forward, and this is what Ubuntu can do at it's best.
Linux depends on millions of Ubuntu users, how have only little programming skills. They are the programmers from tomorrow and they will make the decision which operating system they are using at work and in their freetime. If somebody boycotts the Ubuntu ecosystem he is against Linux overall. He doesn't want that Linux will become a success at the desktop.

July 16, 2019

Planning vs. plan recognition


Successful example of Artificial Intelligence for gameplaying is chess and tictactoe. In both cases the AI works by creating the gametree and search for a node in the tree. Because this strategy works so great, most AI amateurs are trying to transfer this idea to robotics as well. The problem is, that robotics has a larger state space and it's not possible to build the entire state space.
To overcome the bottleneck we have to describe what AI planning in general is. Planning means, that a game engine is available in which actions are allowed. In case of chess, the game engine allows the player to make different moves in the game. The underlying game engine affects the size of the state space. If the player has more possible actions and if the game tooks longer, then the state space will become greater. The only way in reducing the state space is to modify the underlying game engine. If the game contains of a small amount of moves the state space is much smaller.
The question is not how to plan with the existing game engine, the more interesting question is how to create a new game ontop of the old one which has an abstract state space. I want to explain this on a simple maze robot. In the normal game, the robot can walk in four directions: up, down, left, right. The result is a certain type of games. For example, if the robot would like to go 10 steps upward, he has to execute the sequence: up, up, up, up, up, up, up, up, up, up.
To simplify the game, we can add a macro-actiion which is called “5up”. In the newly create game, the robot can change it's position with the 5up command directly to 5 steps upwards. To reach the same goal position, he has to execute the sequence: 5up, 5up. On the first look, the idea of macro-actions looks not very powerful, but it is. It allows to reduce the state space for any game. The result is, that the solver can plan longer sequences in a shorter amount of steps. We are not talking about an improvement of 10% or 50%, but the improvement will become 1 million percent and more. It's possible to exploit macro-actions as the only problem solving technique to play all kinds of games.
The only difficulty is, that most games, doesn't provide macro-actions. They have to be invented by the programmer first. This is called domain knowledge, because it's annotate the gameplay on a semantic level. But let us go back to the planning process. If the game engine is fixed, it's indeed hard or even not possible to plan for a complicated game. A game has a fixed amount of actions, and if the solver can only the normal actions he will have to search the game step by step. If the gameengine is a physics simulation, the costs of executing a single action will become much harder than in chess. That means, if the programmer is not allowed to improve the game engine with macro-actions he will struggle with AI planning.
The interesting point is, that it's ok to extend a game engine with new actions. It's not cheating to invent an action like “5up”. It's the same what humans would do if they want to play the game. They are not saying, that the player has to press 10x times the up key, but they will say “go to the top”. That's shorter and increases the abstraction level. The same strategy will improves the human-machine communication as well. If the game engine gets new abstract commands, it will allows the human player to formulate more elaborated commands.
The only problem is, that creating hierarchical abstract macro-actions for a given game is more complicated than only traverse a given game engine. That means, the overall concept is a bit harder to grasp. To make the understanding more easier, it's important to know, that in AI planning the planning can be ignored. If the STRIPS file is available, it's very easy to search in the gametree. This can be realized with 20 lines of code, or with an existing solver. The more demanding task is to create the STRIPS file for a certain domain. This is the real bottleneck in AI planning. Let us explain why AI planning itself is easy.
Suppose a game engine is available. The game engine provides to the outside world a set of possible actions: action0=left, action1=right, action2=up, action3=down. If the actions are executing in serial order a gametree is the result. This is a graph of all possible combinations. A solver can send the sequence (left, left, up, up) or he can send (up, up, right, down) to the game engine. Traversing the game tree means, either to send random commands to the game engine which takes a bit longer, or to create a dedicated tree which speeds up the search a bit. And now we can ask which issue will limit the solver, it's the size of the state space. That means, if the total amount of nodes is only 100 or maybe 1000 the solver will find the plan very fast. But if the number of nodes is higher, he will struggle.
Instead of explaining what AI planning is, the better idea is to ask what the size of the gametree will be. If the size is too large, AI planning will fail and we have to modify the game engine with macro actions.

Qlearning simulates a physics engine


The amount of tutorials about qlearning is huge. The best one http://mnemstudio.org/path-finding-q-learning-tutorial.htm explains qlearning as a graph search technique. I'd like to describe the idea from an abstract point of view. Every game needs a game engine. The game engine will answer what-if questions. In case of qlearning the game engine aka forward model is stored in the Reward matrix. The reward matrix is static, which means it is always the same and contains the game rules.
What makes q-learning unique is, that the game engine not only provides the follow up state but also a quality value, if the action makes sense or not. The q-value is stored in the q-matrix and gets improved by an algorithm. Let us give a short example.
Suppose, the robot has to traverse a graph. He is at the root node and likes to walk to the goal node. The possible links in the graph are stored in the forward model of the game. This forward model is given by the R-matrix but can be implemented without a matrix but in sourcecode as well. The forward model defines, which actions are possible in each situation, that means how the game can be played. Now we can introduce the learning aspect of q-learning, which is given in the Q-table. Creating a q-table means to annotate the graph with a cost function. The robot has the choice between different follow up nodes, and the q-value simplifies his decision. The computer theory term is weighted graph.
Basically spoken, qlearning allows to learn a weighted graph. At the beginning only the links between the graph is unknown but the costs are unknown. And after the training is over the graph is described in detail. The robot can follow the path with the lowest costs and this will direct him to the goal. The standard algorthm for find the shortest path in a graph is called Dijkstra's algorithm. It's a path planner for known costs of the edges in the graph. The interesting point is, that Dijkstra's algorithm, A*, and RRT have all the same efficiency. That means, they will find the shortest path in a low amount of time.
What i want to explain is, that q-learning and A* is the same technique. It is used to search in a graph for a goal node. The performance is the same. All the qlearning toy problems (for example a robot in a maze) can be solved with A* like algorithm in the same amount of time. The term learning within the qlearning paradigm means, to determine the fast way in traversing the given graph. So in reality, qlearning is a graph search algorithm.
Bottleneck of qlearning
The bottleneck of qlearning is the same like in all graph search algorithm. It works only if the number of nodes is small. That means, a problem which contains of 100 nodes can be handled easily with A* or with qlearning. The algorithm will calculate a bit in the state space and it will find the optimal path in graph. If the number of nodes is greater, then A*, RRT, and especially qlearning will fail. It means, the qmatrix can't be created, and the algorithm will need to much cpu ressources.
If qlearning is only a graph search algorithm why does the algorithm works so great? Because graph search is a powerful problem solving technique. If a problem was converted into a graph, and the graph is searched reasonable fast, then the software is able to figure out the correct actions. The question is not, why graph search is able to play a game alone, but the more important question is under which conditions the strategy fails. There are some bottlenecks available which are converting the problem into a gametree and handling larger trees. The normal graph traversing algorithm doesn't answer this problems and that's the reason why qlearning, A* and RRT are useless for most complex tasks.

The conflict between Debian and Fedora


There are two major Linux distributions available which are not compatible to each other. Fedora works with a different packager manager than Debian, and the kernel patches and the GUI looks different. The difference can be emphasized more, if we are focus on the conferences around the operating system. Which means, the Debconf series has a different schedule then a conference about Fedora.
The good news is, that the difference can be explained very well. Debian and Ubuntu conference are made from enduser for endusers. A typical topic is who to use Gimp to paint an image, or how to install a SQL database with Linux. The point of view is from a user perspective which is sitting in front of a workstation or server and is trying to make something useful with the machine. In contrast, the Fedora world is about improving the software, which means to fix existing problems in the Linux kernel and to maintain the systemd sourcecode. This explains where the confusion comes from. A talk about the internals of the Linux kernel is offtopic at the Debconf conference, while a talk about how to switch from Microsoft WIndows Office to LibreOffice is offtopic at a Fedora related conference.
The interesting point of view is, that both topics has to do with Linux and Open Source software, but they are not fitting in a certain Linux community. That means, Fedora is interested in the sourcecode and how to program an operating system while Debian is interested in the Open Source movement and how to support the enduser.
The prediction is, that the difference between Fedora and Debian is so big, that both communities aren't able to combine their strength, but they will work against each other. Which means, they have nothing to say to the other side and there is need for two Linux communities and two Linux distributions. It seems that the divide between programmers and enduser is available in the Open source world as well. That means, the total amount of Linux user is greater than the number of programmers who are contributing patches to the Kernel. Red Hat and Fedora can be interpreted as the core of the Linux development. It's the place where the software is created. Ubuntu and Debian can be described as user-community which is trying to install, document and teach the Linux operating system to the public. They are doing all the marketing.
Debian and Ubuntu was the driving force behind the success of Linux. They have put Linux to the desktop, they have pushed Linux into the mainstream. The reason why is because Debian and Ubuntu speaks the same language like the enduser. On the other hand, Fedora and Red Hat have created the Linux software. They make sure, that important developments like the ext4 filesystem, the systemd modules and the wayland display server were realized in C code.
The different social roles can be compared with the company structure of Microsoft. Microsoft has at least two divisions: One marketing department, which is writing the manuals, which are writing the press releases and which gives the interviews in the media. And the other division which is a bit in the background is the engineering section, in which programmers are creating the software and improve the code.´
It's important to understand, that the Debian community doesn't provide software but they are asking for technology. That means, Debian experts are the advocates of the endusers. They are asking questions like “why does the kernel boot so slowly?”, “what is wrong with the Graphics driver?”, “Why is my game doesn't work anymore?”. It's up to the Fedora community to answer these questions. This explains, why both communities can't be merged into a single one. One side is formulating a request, the other is responding to it.
The paradox situation is, that it's not possible for a normal user to switch to the Fedora distribution. Sure, he can download the ISO file from the internet and install it on the local PC, but he won't become part of the Fedora community. He will remain an ubuntu / debian user because he is using the computer as an enduser, which means by starting existing sourcecode and get upset about the latest security bugs. Even if the enduser is running Fedora Linux, he is part of the Debian community.
Debconf14
Let us go back to the Debian conference 2014 and analyze the talk of Linus Torvalds before the audience. The first fact was, that Torvalds was invited to the Debconf conference, but not the other way around. Which means, the Debian experts aren't speaking at a Fedora conference. The reason why has to do with the hierarchy. On top of the command chain stands the enduser, he is represented by Debian and Ubuntu. In contrast, kernel maintainers, programmers and other contributers have to fulfill the needs of the customer. They have a lower status.
Now we can describe the conflict at the Debconf14 in detail. The discussion at the end showed a conflict. The debian members have criticized for some reasons and they were right. In the Open source movement, the kernel programmers are nothing, and the Debian community is everything. Which means, Debian and Ubuntu have the mandate to criticize Torvalds but not the other way around. If a programmer, especially if he is very good in his job, tries to critize the enduser, or tries to question the Ubuntu project, he is out of the game. That means, he will do so only once, and then he is no longer allowed to be part of the Open Source movement.
It's important for the Debian and Ubuntu community to understand, that they are on top of the hierarchy. They are leading the Linux movement, and the kernel programmers have to obey. It's easy to identify who is higher on the hierarchy. If somebody has more contact with the enduser, then he has more power. He is allowed to criticize lower levels and explain them how to make the job.
But is the Ubuntu distribution really near to the customer? Yes they are. The askubuntu website has collected 320k questions. A similar website called askfedora isn't available. That means, Fedora doesn't know what the customer is thinking. They are not communicating to the enduser. This fact provides the natural mandate to the Ubuntu distribution to become the leader. They are the managers, especially for the Kernel programmers and gnome-developers located within the Fedora community. What does this mean? It means, that Linux developers are not allowed to critize Ubuntu or argue against it. Because then they are questioning the enduser and that is a no no. The enduser, especially the newbie, is always right.
Let us listen to the enduser. According to https://askubuntu.com/questions/1158648/audio-stuttering-crackling-in-ubuntu-18-04 the pulseaudio daemon produces a stuttering bug in the latest Ubuntu release. This tool and especially the programmer behind it should be blamed. They have made a mistake and they are in charge to fix it.
Programmers get a stage, but they aren't leading Linux
In the Linux community, many talented programmers have written sourcecode. They are contributing new C programs, make the existing one more reliable and they are writing drivers for new hardware. These programmers need a stage in which they can get applause from the audience. What the programmers and tech-experts aren't very good is leading and managing the overall Open Source movement. They play only a small part. They need a concrete task which they can fulfill and then they go back to work.
The Linux movement itself, it's growth and especially the higher decisions are made by the marketing department which is equal to Debian and Ubuntu. That's the place in which the enduser meets the Open Source community, and it's the first contact point for new users who have no experience with LInux at all. Debian and Ubuntu are providing the stage, they make conference, and they are applauding and discouraging the programmers. The future role of Linux, it's influence in the mainstream and their market share is decided by Ubuntu.
Somebody may argue, that a good product like Linux doesn't need any kind of marketing. The sourcecode is written well and more isn't needed. That is wrong, because Linux depends heavily on feedback from the users. If the users doesn't like the system anymore, it will become obsolete. Writing the software and fixing bugs is a lowlevel task. It's done by less important people in the background. The more important aspect of Linux are the spokesman and spokeswoman who give Linux a personality. Which is the Debian founder Ian Murdock, Ubuntu founder Mark Shuttleworth and Jane Silber (former CEO of Canonical Ltd)

July 12, 2019

Sokoban as a testbed for plan recognition



The easiest way for teaching Artificial Intelligence is a game in which a task has to be fulfilled. In contrast to a real robotics problem, the position of the player is available by default and no image recognition problem is there. What is not available is the algorithm for playing the game alone. In the screenshot a simplified version of the Sokoban game is shown. Sokoban is more complicated than only follow a line, but it's not too complex to program the game. The underlaying physics engine which is calculating if a box can be pushed or not can be implemented in under 20 lines of code.
What makes the game interesting is, that apart form it's simple GUI the underlying state space is huge. The player can push the boxes in thousands position on the screen. He can first push the first box or do the task in another sequence.
The interesting question is how to solve the game? A naive approach would follow the tictactoe principle which means, that gametree is generated and then a node in the graph is identified. Let us use this strategy in the Sokoban domain. According to the screenshot, both boxes are on the top left and they should be pushed to the bottom right. For doing so the robot can move into four directions. Figuring out the next actions isn't so complicated. Or it is complicated if we are going into the details.
A simple calculation will show, that if we want to plan 8 steps ahead, the total amount of possible actions is 4*4*4*4*4*4*4*4=65536. If we want to bring both boxes to the goal position, a human player will need around 60 steps for executing the task. The resulting gametree contains of 4^60=1.329228e+36 nodes. 10^36 is too much even if somebody would utilize the latest generation of Nvidia graphics card. The insight is, that Sokoban can't be solved with Artificial Intelligence.
To overcome the bottleneck with the exploding state space, something different from AI planning has to be utilized which is called plan recognition. The idea is to invent a plan notation first, track the human actions if he fulfills the plan, and then use the model for hierarchical planning. Let us describe the details. Plan notation means, to define in the Sokoban game a language for human machine communication. The goal of the game is to push the boxes to a certain position on the map. So we need a command like “pushbox(boxid,target)”. We can simplify the syntax by defining two separate skills: “pushbox1tobottomright”, “pushbox2tobottomright”. To fulfill such macro-actions, a helper skill is needed which has to do with the movement of the robot. We are defining addtional skills which are “movetobox1”, “movetobox2”. Now we can formulate the plan in the plan notation:
“movetobox1”
“pushbox1tobottomright”
“movetobox2”
“pushbox2tobottomright”
The next step is to ground the skills. Grounding means, that the gamelog of the sokoban game is annotated with skill names. This is the core idea of plan recognition. To be more specific: if the player moves the robot to box1, then the parser should print out the skill name. To realize such a requirement, the physics engine of sokoban gets extended with new action names. That means, we can send the high level command “Movetobox1” to the physics engine and as a result the absolute position of the robot get's modified.
To make the explanation a bit shorter, the idea is to construct the gametree with the help of the newly defined high level skills. This transforms the Sokoban game into a symbolic game which has a smaller state space.

Understanding cognitive models and cognitive architectures


If somebody has taken a deeper look into Artificial Intelligence he will recognize a large amount of literature about cognitive architecture. They are abstract models to describe human behavior. On the first look a cognitive architecture doesn't make much sense, because it's internal structure works different from computer science. In computer science the idea is to program a robot to do a task, this is done by realizing an algorithm in software. But in a cognitive model there is no code written in Python and no algorithms at all.
Overcome this bridge is not very hard. The keyword for understanding cognitive models is “plan recognition in teleoperation”. It means, not to program a robot with an algorithm, but to record human's actions in a teleoperation task. A cognitive model was invented to track human level intelligence. Which means the precondition is, that the human operator has already the capability of storing information in a memory, to recognize objects and to make decisions.
Let me explain the overall structure from the experiment point of view. At first, a human operator is using a teleoperated robot arm to stack bricks. The scene is monitored with cameras and converted into a gamelog. This information is feed into the cognitive model. It is used as a scene recognition and behavior recognition system to understand human behavior. There is no need to program an Artificial Intelligence at all, because the human operator will provide the example decisions.
If a human operator plays a game, the gamelog is created in the background. A gamelog contains information about the player's position, the position of the enemy and which key was pressed. The task of the cognitive architecture is to store the raw data in a buffer, and then analyze the information on a semantic level.

How to improve WIkipedia


On the first look, the famous encyclopedia has a great quality. In the English version it contains of around 5 million keywords from all topics. The problem is, that it's difficult to find a subject which doesn't has an Wikipedia article already. For example, if we are interested in the topic of neural network, we will notice that an article was written already. Does that mean, that Wikipedia doesn't need help? No, it means that potential authors have to search more intensive to identify missing piece of information. The easiest way in doing so is to understand the difference between a popular encyclopedia and a scientific one.
Wikipedia is without any doubt a great popular encyclopedia. All the important topics are explained in well written articles. But it doesn't fulfill the standards of academic needs. The main difference is, that an scientific encyclopedia contains more keywords, especially two words keywords, and three words keywords. Let me give an example. In the normal Wikipedia an article is available about “Gaussian process”. It describes what the idea is, and gives references to external literature. For a popular encyclopedia it's a high quality article. The problem is, that Wikipedia doesn't provide an article about “Gaussian Process Kernels for feature selection” which is a very specialized topic. It has to with Gaussian process” but it is focus on a niche.
Highly specialized articles are needed in an scientific encyclopedia. Well written role models in the printed market show, that three words and four words articles are common in such encyclopedia. They are not simply introduce a topic to the newbie but they are written for an expert audience who has a certain information desire. This kind of content is missing in the WIkipedia today. The reason is, that a highly specialized article will generate a low amount of traffic, which means around 1 hits per day. On the other hand, it's more difficult to write such an article. This combination is equal to higher costs, which means, that in the past only a small number of such Wikipedia article were created.
What a potential author can do within WIkipedia is simply: He has to search for a specialized lemma and if it's not there, he should create a new article. Somebody may ask what the purpose is, to insert highly special keywords which are containing of two or three words. The reason is, that a domain can only be understand by it's specialized vocabulary. A detailed keyword makes it easier to approach a subject.
Let us describe the situation from a more abstract point of view. Wikipedia is great for general keywords like neural networks, robotics, or LSTM network. But it lacks on specialized vocabulary from within a discipline. That is the reason, why Wikipedia hasn't replaced academic encyclopedia.