3
votes
What algorithm should I use for this game problem?
I've written several solvers for games like this, and I usually start with a simple state space search. Assuming that you have the concept of a GameState, it should support generating all valid child ...
3
votes
Accepted
What algorithm should I use for this game problem?
My first thought for solving this was indeed A*. I cannot tell whether this is feasible or not, since this really depends on the number of states, the number of steps to get there and how well the ...
3
votes
Drawing all lines from right to left - fast
SVG shapes are a collection of (mainly bezier) curves. To draw a curve from right to left, you'd need to find all the points where the curve has local maxima on the x-axis, split the curve into two at ...
2
votes
Find nth best path in graph G from node A to node B (without loops)
I can't claim to have read it fully, but there's an algorithm by David Eppstein that appears to satisfy your requirements. A brief read suggests that it builds a tree of possible branching choices in ...
2
votes
How to represent shortcut nodes in Java?
A* cannot generally be used with shortcut/jump nodes. This is because A* uses a heuristic, roughly: “walking into the direction of the target is the optimal route, barring any obstacles”. Or more ...
2
votes
Accepted
What is the best way to program a lattice graph?
If the graph has a clear structure as in this case (there seems to be a rectangular grid with each vertex being connected to 8 neighboring vertices) then implicit representations can be convenient, e....
2
votes
What algorithm is used by elevators to find the shortest path to travel floor orders?
This answer is about a more advanced destination control system. In a building with multiple elevators where people indicate which floor they want to go to and the system assigns an elevator to them.
...
1
vote
Accepted
Drawing all lines from right to left - fast
For an outline, let us ignore ellipses and stick to lines.
The laser cutter can cut lines [...] with simple instructions, as well as making jumps
Let me assume you mean "straight line segments&...
1
vote
How to find all possible paths with specific length in hexagonal game board?
The best resource for hex-grid algorithms I've ever read is this Red Blob Games article, and it has a whole section on movement range. It says:
If there are obstacles, the simplest thing to do is a ...
1
vote
How to find all possible paths with specific length in hexagonal game board?
Yes, in fact most algorithms that check whether there is a connection between two graph nodes also compute what the connection is. It's just a matter of not discarding the information that was used to ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
path-finding × 15algorithms × 11
graph × 5
path × 3
java × 2
game-development × 2
graph-traversal × 2
c++ × 1
optimization × 1
state × 1
artificial-intelligence × 1
simulation × 1
dijkstra × 1
a-star × 1