path-finding

Implementation of A Star (A*) Algorithm in Java

 ̄綄美尐妖づ 提交于 2019-11-28 21:33:49
Disclaimer: I have little background in Java, since I am predominantly a C# developer. Would like to have the java implementation of A* algorithm. Yes, I saw many versions of the same online and I am unable to choose between them. I am looking for an A* algorithm implementation that uses all new features of java that makes the algorithm faster(even if a tad bit). The reason is that we are implementing that for path-finding on an MMO and so, performance is the top priority. Any pointers ( on atleast where to look ) ? Try several, measure, pick the fastest, adapt to your needs. Performance is

What is the most efficient way of finding a path through a small world graph?

萝らか妹 提交于 2019-11-28 21:29:24
问题 I have a sea of weighted nodes with edges linking clusters of nodes together. This graph follows the typical small world layout. I wish to find a path finding algorithm, which isn't costly on processor power, to find a path along the best possible path where the nodes are the most favorably weighted, the fastest route is not the most important factor. This algorithm, also takes into consideration load bearing, and traffic rerouting. (sidenote: could neural networks be used here?) Thanks I'm

Pathfinding 2D Java game?

ⅰ亾dé卋堺 提交于 2019-11-28 18:54:11
I'm currently writing a very basic Java game based on the idea of Theme Hospital . I'm quite new to Java and am currently studying at the university my first year. I have done Java for nearly two years now on and off, but I'm finally devoting my time to a decent project. I'm at the stage where I need to create a person (patient) to be admitted to the hospital. They need to go to the reception desk, then GP's office, and then back to their starting position. I have looked into A* path finding, but it seems really complicated to me. I understand how it works I think, but am unsure how to

Algorithm to find two points furthest away from each other

我只是一个虾纸丫 提交于 2019-11-28 17:52:15
Im looking for an algorithm to be used in a racing game Im making. The map/level/track is randomly generated so I need to find two locations, start and goal, that makes use of the most of the map. The algorithm is to work inside a two dimensional space From each point, one can only traverse to the next point in four directions; up, down, left, right Points can only be either blocked or nonblocked, only nonblocked points can be traversed Regarding the calculation of distance, it should not be the "bird path" for a lack of a better word. The path between A and B should be longer if there is a

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

邮差的信 提交于 2019-11-28 17:13:48
This is a very difficult problem about how to maneuver a spaceship that can both translate and rotate in 3D, for a space game. The spaceship has n jets placing in various positions and directions. Transformation of i -th jet relative to the CM of spaceship is constant = Ti . Transformation is a tuple of position and orientation (quaternion or matrix 3x3 or, less preferable, Euler angles). A transformation can also be denoted by a single matrix 4x4. In other words, all jet are glued to the ship and cannot rotate. A jet can exert force to the spaceship only in direction of its axis (green). As a

A* Admissible Heuristic for die rolling on grid

纵然是瞬间 提交于 2019-11-28 16:41:10
问题 I need some help finding a good heuristic for the following problem: You are given an R -by- C grid and a six-sided die. Let start and end be two distinct cells on this grid. Find a path from start to end such that the sum of the faces of the die looking up, as the die is turning along the path, is minimal. The starting orientation of the die is the following (the "2" is facing south): The way I modeled this problem is by considering the value of the die's face as the cost of an edge in a

Difference and advantages between dijkstra & A star [duplicate]

我们两清 提交于 2019-11-28 14:44:14
问题 This question already has an answer here: How does Dijkstra's Algorithm and A-Star compare? 11 answers I read this: http://en.wikipedia.org/wiki/A*_search_algorithm It says A* is faster than using dijkstra and uses best-first-search to speed things up. If I need the algorithm to run in milliseconds, when does A* become the most prominent choice. From what I understand it does not necessarily return the best results. If I need quick results, is it better to pre-compute the paths? It may take

Minimum distance between start and end by going through must visit points in a maze

旧街凉风 提交于 2019-11-28 11:39:06
问题 So, suppose i have a maze, which has a start point and an end point, marked with Orange and red respectively and my goal is to find the minimum distance between them. The blocked path is represented by black colour and the open path is represented by white colour . However there are two modification done in this. There are some cells which are must visit, marked in grey colour. Any cell can be visited any number of times(even the start, finish and must visit points) for ex- B=Black, W=white,

Optimizing pathfinding in Constraint Logic Programming with Prolog

送分小仙女□ 提交于 2019-11-28 11:06:00
I am working on a small prolog application to solve the Skyscrapers and Fences puzzle. An unsolved puzzle: A solved puzzle: When I pass the program already solved puzzles it is quick, almost instantaneous, to validate it for me. When I pass the program really small puzzles (2x2, for example, with modified rules, of course), it is also quite fast to find a solution. The problem is on computing puzzles with the "native" size of 6x6. I've left it running for 5 or so hours before aborting it. Way too much time. I've found that the part that takes the longest is the "fences" one, not the

Best First Search algorithm in Scheme

此生再无相见时 提交于 2019-11-28 09:53:53
问题 Okay this is a homework question, and I just don't have a clue how I suppose to start. Some help and hints will be much appreciated. I need to use a heuristic function to solve a maze type problem. Suppose I have a 5x5 grid, and a robot in position (1,5) and my goal is to move the robot to (5,1). Along the way there are few obstacles, say (X,1,3) , (X,2,3) , (X,5,3) , (X,4,2) Print out the route the robot has gone through. I'm thinking using the greedy best first search algorithm to find a