Monday, December 10, 2018

Labyrinth with Pygame

Pygame
Members:

Jose Illescas, Oscar Mora
jillescass1@est.ups.edu.ecomora@est.ups.edu.ec


General Perspective

Pygame is a virtual library of Python which is widely used for the creation of video games, as this tool helps control which is audio, video, graphics, etc.
The system should be able the can find a solution of form efficient and autonomous.
Using the search algorithm to * must find the way faster and at lower cost from the beginning to the end of the maze.

Objectives

  • Develop an application or maze game where an intelligent agent find the shortest path.
  • Learn about the use of the tool PyGame of Python.
  • Learn about the different types of search algorithms that we have within what is artificial intelligence.
  • Implement a search algorithm with reasoning A * or Ascent by Hills.


Proposed Solution

  • First Stage
    • Implement a code in Python programming language that manage what is the search algorithm either the ascent by hills or the A*.
  • Second Stage
    • Implement a code of the game also programmed in Python, which will allow us to combine with the algorithm already created so that you can perform the search.
  • Third Stage
    • Once you have created the two sides that are the game and the search algorithm in the same language of programming, we proceed to the combination of the same because there is not much difficulty.
  • Fourth Stage
    • Once combined the game with the algorithm we created earlier, we proceed to the creation of the graphical interface, which the tool used PyGame.


Schematic Diagram:


The game was developed with the help of the programming language Python and pygame and has as purpose to use search algorithms implemented to improve performance and speed with which the machine finds the solution so it will be a good choice to use spread of constants.

In the next picture can see the code in python of the algoritm A*.



Tests:




In the video can see the execution of the game.







Recomendations:

The use of complex search algorithms dramatically improve the fact of seeking the best path to the lower cost per what we should seek to know in depth how they work these algorithms to be able to use them appropriately.

Link of the Code in GitHub:


References:
[1]. McGugan, W. (2007). Beginning game development with Python and Pygame: from novice to professional. Apress.

[2]. Sweigart, A. (2012). Making Games with Python & Pygame. North Charleston: CreateSpace.