PHP Classes

Suggestion

Recommend this page to a friend!

      PHP Matrix Similarity  >  All threads  >  Suggestion  >  (Un) Subscribe thread alerts  
Subject:Suggestion
Summary:I like the possibilities of the class
Messages:4
Author:Dave Smith
Date:2015-06-01 09:23:05
 

  1. Suggestion   Reply   Report abuse  
Picture of Dave Smith Dave Smith - 2015-06-01 09:23:05
First, let me say congratulations on the innovation nomination. I know I am supposed to be cheering for the USA, or even my own, however I think this class could be the start of something very interesting.

Imagine plotting a floor plan which contains immovable, impassable objects. Now add in multiple movable objects which are also impassable, like robots. All movable objects have access to the same floor plan, which contains the exact location of all objects at any given time. We could give each movable object their own destination and they in turn can calculate the best path, adjusting it according to the current location of the objects around them. We would now have the beginning of a simple navigation system for artificial intelligence.

The main thing we would need to enhance your class is the ability to specify a symbol that represents a shared similarity with all movable objects. This would be the white space that all movable objects can use to calculate a valid connection, basically possible paths.

Once we have that, and to have a truly advanced AI navigation system, we would need to be able to set some basic rules of motion and fuzzy logic to help smooth the motion. Although these pieces can be done later.

Dave

  2. Re: Suggestion   Reply   Report abuse  
Picture of Ghali Ahmed Ghali Ahmed - 2015-06-01 09:30:34 - In reply to message 1 from Dave Smith
This just a crazy idea,

surly i will take a look

big thanks

  3. Re: Suggestion   Reply   Report abuse  
Picture of Ghali Ahmed Ghali Ahmed - 2015-06-01 14:16:54 - In reply to message 1 from Dave Smith
Regarding your suggestion,

i think this class should be coupled with some graph algorithm to perform what you say

an algorithm like dijkstra for exemple:

algolist.com/code/php/Dijkstra%27s_ ...

this is just a quick reflexion

  4. Re: Suggestion   Reply   Report abuse  
Picture of Dave Smith Dave Smith - 2015-06-01 16:59:10 - In reply to message 3 from Ghali Ahmed
It looks like it would be useful to run 1 time at the start of each movable objects journey to help it avoid dead ends. You have to consider that whenever a movable object makes a move, the environment changes for all other movable objects, so you would be constantly plotting a new path for every other object if you attempted to run the algorithm more than one time for each movable object.

If you think about it, each movable object just needs to attempt to take a step in the correct direction. So we just need to know which connections are available 1 step away and then choose the best step for that moment. If you ran this algorithm at the start for each movable object, it could be used a guideline (fuzzy logic) for choosing the best step. If it became a movement rule, you would wind up with movable objects moving into each others path one step away and never being able to move again.

Dave