AI of spaceship’s propulsion: land a 3D ship at position=0 and angle=0

I’ll try to keep this short and sweet. One approach that is often used to solve these problems in simulation is a Rapidly-Exploring Random Tree. To give at least a little credibility to my post, I’ll admit I studied these, and motion planning was my research lab’s area of expertise (probabilistic motion planning). The canonical … Read more

Where can I find information on the D* or D* Lite pathfinding algorithm?

Wikipedia has an article on the topic: http://en.wikipedia.org/wiki/D* Also a D* Lite implementation in C is available from Sven Koenig’s page: http://idm-lab.org/code/dstarlite.tar However I find the impenetrable math much easier to read than the C source code 😉 Another implementation of D* Lite (in C++) is available here: http://code.google.com/p/dstarlite/

A* Admissible Heuristic for die rolling on grid

Well, I’ll add my comment here, since it is more optimal than the current highest-voted answer by @larsmans – but, I am convinced there must be something better (hence the bounty). If I multiply the heuristic with a constant, it’s no longer admissible The best I can come up with is (manhattenDistance/3)*6 + (manhattenDistance%3), where … Read more

Longest word chain from a list of words

You can use recursion to explore every “branch” that emerges when every possible letter containing the proper initial character is added to a running list: words = [‘giraffe’, ‘elephant’, ‘ant’, ‘tiger’, ‘racoon’, ‘cat’, ‘hedgehog’, ‘mouse’] def get_results(_start, _current, _seen): if all(c in _seen for c in words if c[0] == _start[-1]): yield _current else: for … Read more

Generating a tower defense maze (longest maze with limited walls) – near-optimal heuristic?

I present a greedy approach and it’s maybe close to the optimal (but I couldn’t find approximation factor). Idea is simple, we should block the cells which are in critical places of the Maze. These places can help to measure the connectivity of maze. We can consider the vertex connectivity and we find minimum vertex … Read more

Pacman: how do the eyes find their way back to the monster hole?

Actually, I’d say your approach is a pretty awesome solution, with almost zero-run time cost compared to any sort of pathfinding. If you need it to generalise to arbitrary maps, you could use any pathfinding algorithm – breadth-first search is simple to implement, for example – and use that to calculate which directions to encode … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)