Intelligent System – 7

For this week, I created the UI and visualize for the congklak game using a pygame. It consist of the images of the board, the congklak seeds (and its amount information), and an information about the current player turns. This is what it looks like.

As you can see, in top left corner is the information about the player turns. And inside each hole is the congklak seeds with its amount. And if there is no seed in the hole, it automatically remove the images.

Intelligent Systems – 6

For this week, I created an interactive UI for the main menu using pygame. The main menu contains 4 buttons which are an option for the game modes (Single-player, multi-player, ai vs ai) and a quit button. The menu navigation is by using a mouse to hover to the buttons and left-click it. The buttons automatically became large when the user hover the mouse to the buttons and instantly return to its normal size when it is not hovered by a mouse. Here are the codes:

Intelligent System – 5

For this week, I decided to create the data structures that are needed for the game. Since this is a congklak game, I created the data based on what is in the game.

This is the congklak data, which contains the data of the hole in the congklak board. Each hole contains another data such as the x, y coordinate and the amount of congklak seed. So basically it is a data inside another data. For example index 1 indicates the first small hole and inside it is located in the coordinate x = 130 and y = 160 and it also stored 5 congklak seeds.

There are 3 game modes in this project. The first one is single player which lets you play against an AI, the second one is multi where it is player vs player and the third one is AI vs AI. This is the data that is stored in each game modes. Inside the p1/p2, the indexes represents the current player who are playing the game and also the AI that is used.

This code creates the sprites for the hole in the congklak board, it also calls the data that is stored in the congklak data that i explained earlier. After that, I put all of them into an array of data so it can be easily called based on the index. I also group them so I can blit the sprites all at once.

Intelligent System – 4

Since I was tasked with the assets and the UI for the game, I decided to create and find some assets that will be used as a sprite for the game later on. After that, I created an assets file on python which contains classes of the assets that are used in the game such as the buttons, background, congklak board, congklak seed. Another purpose of this assets python file is to make it easier to call classes in the main file and also making it tidy.

Intelligent System – 3

In our 3rd week, our team discussed the development, planning, and task distribution for the intelligent system final project. To distribute the work easier and according to plan, we use Trello. Trello is useful to distribute the task to each member evenly and monitor the deadline. After discussing the task distribution, we decided to divide the task into something like this:

  • Fauzan: Assets, UI, Animation of the game, Data structure.
  • Jason: Responsible for the game logic.
  • Vincent: Responsible for the AI.

Intelligent Systems – 2

The second week for intelligent systems, we learned about the possible algorithms that are suitable for our project. As of right now, we found two possible algorithms that we are still debating on which algorithms that we will use. It is the Random Forest Algorithms and Partially Observable Markov Decision Process.

Random forest algorithm is composed of different decision trees, each with the same nodes, but using different data that leads to different leaves. It merges the decisions of multiple decision trees in order to find an answer, which represents the average of all these decision trees.

Partially Observable Markov Decision Process (POMDP) is a combination of an MDP to model system dynamics with a hidden Markov model that connects unobservant system states to observations. The only difference is in whether or not we can observe the current state of the process. In a POMDP we add a set of observations to the model. So instead of directly observing the current state, the state gives us an observation which provides a hint about what state it is in. The observations can be probabilistic; so we need to also specify the observation model. This observation model simply tells us the probability of each observation for each state in the model.