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…

Getting Started

Learning the step-by-step implementation of HFSM concepts in Python.

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…

Automatically build and update Behavior Trees during run-time.


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.

Designing and Implementing Behaviors for AI Agents

Introduction — Another way of implementing Acting Engine

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…

Understanding what actually happens when we use static local variables and when we should use them

C++ Storage Duration

One of the basics we often miss when learning C++ is understanding the details of storage duration. The storage duration of an object determines its lifetime. It also determines in which segment of memory the object will be stored, whether it be on the stack, heap, or data. There are…

Curiously recurring template patterns can help us write common functionality by combining templates and inheritance

What is the CRTP Idiom?

CRTP stands for Curiously Recurring Template Patterns, a name coined by James O. Coplien in his 1995 paper. It is about specializing base classes using derived classes as template arguments. It looks like the following:

This is a very common example that we can find on the internet when…

Writing Inter-Process Message Passing Framework to improve the expressiveness of our code and make our code more elegant.

Inter-Process Communication

Processes — a recap

We often read online that a process is a program in execution, but wait a minute, what exactly does that really mean? For some, it might not be very clear what that means. Wikipedia provides a hopefully clearer definition:

A process is the instance of a computer program that is…

A framework for passing messages between threads without having to worry about low-level threading code

Inter-thread Message Passing in C++


In many cases, developers have to deal with multi-threading when developing applications. When dealing with multiple threads, we almost certainly need to synchronize them, and one of the synchronization methods is message passing.

In this article, I will start with implementing inter-thread message passing in C++ using the standard library…

Debby Nirwan

Software Engineering Manager who loves reading, writing, and coding.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store