Archive for the ‘Artificial Intelligence’ Category

A.I. algorithms

Thursday, November 26th, 2009

This will be a tiny post.

I’m excited since I got 2 artificial intelligence algorithms working. Both are related to graph navigations on a discrete world (depth and breadth first search). One of them with a fun twist to get different paths each time it gets called.

Both work ok, one finds the least nodes route (not always the shortest length) and the other finds a random one (sometimes the shortest path, others the least nodes, etc.)

Now it’s time to get into tree’s algorithms so I may get the path with the less length and variations from it.

Probably I’ll be publishing a demo within a couple of weeks… I’m really happy… and tired hahahaha

I know some of you guys are used to these algorithms, I’m not so I’m proud of myself.

A.I. Graphs

Wednesday, November 18th, 2009

So I already coded an A.I. PHP script using graphs.

I used it to figure out a path for the subway stations here in Mexico. As for now it calculates the path with the least stations visited which looks ok for some cases but then there are sometimes when the best path would be the one with the shortest distance traveled and even those occasions where you might not want to walk through too many connections.

So I found myself with three approaches:

1. Less stations.

2. Smallest distance.

3. Less connections needed.

I just made a script to get all the data needed (distance, cost, connections, neighbor station,etc) so now I’ll be digging into the proper A.I. logic to figure out how to solve this. As soon as I finish it I’ll publish a demo.