I’ve been away for a few weeks doing tons of research for new materials that I can bring for this blog and thinking how best to organize them. Also, I’ve been designing a study and project plan to share my AI, Data Science and developer journey with the community and I believe. After much deliberating , I decided to split the blog into three main categories :

  1. Development: we’re going to deal here with the specifics of creating new software projects , these articles will be code intensive and will verse on topics such as software projects, algorithms, design patterns and development tools and frameworks.
  2. Data Science Theory and Trends: These articles will be focused more on the theoretical aspects of Data Science, Machine Learning and AI with brief discussions about implementation and possibly the latest tools used in the practice of this discipline. These articles will not be as code intensive as the Development articles, but may include some code examples or maybe dense in math.
  3. Opinion pieces: Light articles giving my take on specific Data Science or development topics, this will be short and to the point , not very detailed and likely will not contain any heavy math explanations or code snippets. These articles are intended to showcase my thinking about a very specific topic.

This will be the direction of my publications from now on , of course research and development takes a good deal of time so don’t expect a development article every other day, however , with the Opinion Pieces I pretend to be able to publish more regularly , while de R+D takes place in the background.

One of the most interesting applications for Artificial Intelligence is strategy games: how do enemies know where to go and where to hit? , this article illustrates one of the most basic principles of pathfinding , through the creation of a simple Python text videogame.

The Game — Cross the Street and Avoid Danger!

The premise of the game is exceedingly simple. Our player has to cross the board map while an enemy is in pursue. Every time the player makes a move , the enemy closes in its position until the player manages to cross the whole board , in which case he will win, or the enemy catches him , in which case the player will lose.

This game is then comprised by three objects: Board, Player and Enemy

Before we go into the details of how these three objects interact with each other , we need to briefly discuss how computer agents are conceived

Elementals of Agent Design

In general , an Agent is anything that can perceive its environment through Sensors and act upon the environment through Actuators. In the case of computer agents , the agent may detect things like keystrokes , specific data values , files or network data packages.

The agent decides how to act through its actuators with a decision function called agent function, that takes as input whatever information is perceived through its sensors. The agent then is able to act upon its environment.

#python #artificial-intelligence #pathfinding #games

Agents! how do they work?
14.40 GEEK