Attending mind-numbing meetings is not one of them.
Waking up in the morning, feeling refreshed after a good night’s sleep, and more importantly, you know what you want to do today.
Starting your day at the office attending 15-minute stand-up, to share progress and issues you and your team faced the previous day. 15 minutes sharp and the stand-up end.
You are clear about the priority of the tickets assigned to you, you work on them in order from the highest to the lowest, but today you will focus on working on one of them.
You start your day, everything…
Step-by-step Algorithm Implementation: from Pseudo-code and Equations to Python Code. In this article, we will implement the Planning Graph and its planner — the GraphPlanner in Python, data structure and search algorithm for AI Planning.
Planning Graph was developed to solve the issues in complexity found in the classical AI Planning approaches, a.k.a STRIPS-like planners. There are two main parts that we need to implement:
If you are not familiar with the Planning Graph and want to understand more, check out my post…
I wanted to use the HFSM (Hierarchical Finite State Machine) in my Pacman AI Agent Implementation to fully understand the concepts and to compare it with the Behavior Tree. In my experience, after reading books and papers of some technical topics, my comprehension of the topics would greatly improve if I implemented them in code.
Pacman AI is written in Python and so I tried searching HFSM implementation on Github, but couldn’t find a good one for my implementation and decided to write one and release it on Github.
In this article, I want to share what I have learned…
We have seen how powerful the behavior tree is, in the previous post.
It is hierarchical, modular, and more importantly reactive to changes that happen in the agent’s environment.
It can be used to replace Hierarchical Finite State Machines (HFSMs), to make the systems more scalable and understandable to humans.
However, as you may have noticed behavior trees can become very complex if we want the agent to select between many methods to achieve a goal or a task.
Let’s look at an example.
When we plan a trip to a city in another country, we usually start with a…
In our previous posts, we discussed about Planning and Acting. Both are for planning, one with a Descriptive Model and the other with an Operational Model of actions.
Acting with Operational Model uses Refinement Methods to refine abstract tasks into subtasks or commands that can be executed by Execution Platform. In a rather complex domain where there are multiple methods that we can use to refine a task, this approach excels.
However, for many less complex systems, we only have one/two methods that we can use to refine an abstract task into. One may argue that we don’t need planning…
When you start learning C++, the first thing you should understand is the Object Model. Everything else will start to make sense after you understand the Object Model.
C++ can be hard to learn, especially if you come from high-level programming languages such as Python. It is very important to start your learning journey by understanding the fundamentals.
One of them is to understand what an object is. How it is represented in the memory and how it is related to other concepts in the language.
In this article, we will look into the details of the object model in…
The use of Friend in C++ is often confusing for beginners because there are a lot of arguments on the internet about whether using it will increase the encapsulation or break the encapsulation.
This is particularly true if you are new to object-oriented programming — the OOP whose main point is the concept of encapsulation which is to restrict the access to a class’s internal states by preventing other classes from accessing them.
The Friend concept in C++ is a mechanism for a class to deliberately gives other classes or functions access to its internal states. …
HTN (Hierarchical Task Network) Planning is another approach to solve AI Planning Problem. It is similar to the classical STRIPS-like planners in the way it represents the state of the world and executes actions to transform one state into another.
However, it is entirely different in what it plans for and how it plans for it. In the classical planning approaches, the input is a set of goals and the algorithms search through possibilities to achieve the goals. In HTN Planning, the input is a Task to be performed.
A Task is a high-level abstract concept given to the Planner…
When writing a program you will encounter a case where you need to move (large) resources around from one object to another.
In C++ we have move semantics which is a way to move resources to avoid making copies in the memory which not only will make our program slower but also use more space than necessary.
We are not discussing the Move Semantics here, because there are a lot of resources you can find on the internet explaining rvalues and Move Semantics.
What is not so obvious is that when we can rely on the compiler to help us…
Using Constraint Satisfaction Problems to solve AI Planning Problems.
Just like AI Planning as Satisfiability, we can use an existing technique — Constraint Satisfaction Problems to help us solve AI Planning Problems. This way we can use the existing well-developed algorithms for solving CSPs to solve our AI Planning Problems.
We will first go through the general introduction of CSPs. We then continue to see how to encode AI Planning Problems into CSPs. Finally, we use CSP Backtracking Algorithm to solve our problems. We will prove all these theories by implementing them in Python.
CSPs are mathematical questions…
Software Engineering Manager who loves reading, writing, and coding.