I'm writing a paper comparing D*, D* Lite and LPA* and how useful they are in navigating an agent across a dynamic environment.
If anyone has any info that would be helpful for this please leave below.
Specifically, can anyone explain in simple terms why D* and D* lite traverse from goal to start rather than start to goal like LPA*? I understand the g value would then be the distance from the goal but confused as to what benefits this has.
Thanks in advance.
When you search outwards from the start state, all of the outward paths also give you routes back to the start, making it easy to get back there. Then, when you get to the goal, you have one path to the goal, but many paths from other states back to the start.
If the world isn't changing it doesn't matter whether you search backwards or forwards (or bidirectionally), in the end you have a path that you can use.
But, if the world changes and you lose your one path to the goal from a forward search, it can be hard to re-connect to that single path. If instead you search outwards from the goal, you still have many paths back to the goal. If the world changes, you can then search to reconnect the invalidated states back to any path that leads to the goal (of which there are many). Although it may not be optimal, it may only require a small and simple repair.
Related
I've been trying to get a basic registration working with SimpleElastix for a while now, but I'm not able to make it work at all, regardless of the settings used. Note that I'm trying to compare SimpleElastix to other methods, so using another library is not an option.
Here's the task I'm currently trying to do:
Take a 3D ultrasound scan of a fetus (img_scan)
Mask a part of the scan, and apply a rigid transform (img_structure)
Use SimpleElastix to register img_structure to img_scan.
Since img_structure was created from img_scan, I know for certain that there is an ideal solution to the registration. However, unless img_structure is extremely close to it's original position, SimpleElastix seems to barely do anything at all. For example, if I only translate img_structure in one axis, it works. But if I only rotate it 90 degrees, it fails although their centres are basically the same. To clarify, by fail I mean it returns a slightly transformed img_structure, but nowhere near the the actual solution]
This is the basic code I've started with:
elastixImageFilter = sitk.ElastixImageFilter()
elastixImageFilter.SetFixedImage(fixed)
elastixImageFilter.SetMovingImage(moving)
elastixImageFilter.SetMovingMask(mask_moving)
elastixImageFilter.SetFixedMask(mask_fixed)
elastixImageFilter.SetParameterMap(sitk.GetDefaultParameterMap("rigid"))
elastixImageFilter.Execute()
Things I have tried:
With/without masks (or a combination)
Different MaximumStepLength
Different ImageSampler
Affine instead of rigid
Different Optimizers
What could I be missing?
I'm trying to solve a Pacman-styled PDDL problem and there's a particular scenario I've been stuck on for days now. I'm getting the classic
ff: goal can be simplified to FALSE. No plan will solve it
which means the issue is trivial and logic related. However, I'm new to PDDL and can't seem to figure out what's causing it.
The problem is simple, Pacman (P) has to eat the Food (F), but two ghost agents (G) are blocking it. To get past them, Pacman needs to consume the Capsule (C), making him invisible.
(Edit: I've deleted the question as it was part of an assignment. I managed to solve the issue and will post the solution as soon as the assignment is graded.)
In this thread: About PDDL in AI planning #haz mentioned a good methodology to debug your PDDL Model when the goail is unreachable from the initial state.
The best way to test this out is to follow the following strategy: (1) write down a plan you know will solve it; (2) starting with the first action, set the goal to the precondition; (3) repeat to the end. If that fails, start changing the initial state to what you expect the complete state to be during the execution of the plan. – haz May 1 at 2:04
I uploaded a new version which is able to find a solution (if Ghosts are not in the path of foods):
http://editor.planning.domains/#read_session=c7Vez9nrti
Two main issues:
you never delete GhostPos, but it appears in the goal formula
If GhostPos is on the way to a FoodPos, then you can never reach the food as the move action requires not to be a Ghost.
I'm building a student schedule generator and I need a way of producing more than one solution. Is there some way to save off feasible scores or scores of Xhard/Ysoft?
I need to be able to output more than one potential schedule, that way the student will have a choice for one schedule over the other if for whatever reason they don't want the "best" schedule (maybe they don't like one of the professors, maybe they don't want an 8am class, whatever)
My original idea was to save off all feasible solutions using the bestSolutionChanged event listener. The problem with this, is that once it finds a 0hard/0soft score, it ignores all scores after that, including scores that are equal.
Ideally I'd like to save off all scores of 0hard/-3soft or better, but just being able to save any feasible scores or force optaplanner to look for a new best score would be useful as well.
This is not a solution, but an analysis of the problem:
Hacking the BestSolutionRecaller is obviously not just a big pain, it's also behaviour we don't want to encourage as it makes upgrading to newer version an even bigger pain. So don't expect us to solve this by adding an easy way to configure that in the solver config any time soon. That being said, a solution for this common problem is clearly needed.
When a new best solution is found, it is planning cloned (see docs for definition) from the working solution (the internal solution in OptaPlanner). This allow us to remember that new best solution as the working solution solution changes. That also means the BestSolutionChangedEvents gets a plannng clone and can safely ship it to another thread, for example to marshal it to a client (presuming any ProblemFactChanges you create do copies instead of alterations), without being corrupted by the solver thread that modifies the working solution.
New best solution imply that workingScore > bestScore. The moment it instead does workingScore >= bestScore, we need far more planning clones (which are a bit CPU expensive), but we could then just send out BestSolutionChangedEvents for that too, if and only if a flag is enabled of course, because most users (unlike yourself) don't want this behaviour.
One proposal is to create a separate BestSolutionChangedOrSameEvent, next to the BestSolutionChangedEvent. This might not be ideal, because we need to be able to detect whether or not someone needs those extra planning clones.
Another proposal is to just have a flag in the <solver> config that switches from > to >= behavior for BestSolutionChangedEvent.
Please create a jira (see "get help" on webpage) and link it it here, or create a support ticket (also see "get help" on webpage).
I have a bunch of nodes on each side of a central node. I am trying to find a way to position the node lines so that they go to the right or left side of the nodes.
So for this:
http://jsbin.com/ipuxub/4/edit?js,output
I want the lines for the Jerry node to go to right side of Elaine, George, Kramer, etc.
While I don't think this is possible now:
Is there a way to force it, trick it or make it look better?
If it is changing the Cytoscape JS code, any suggestions to where I begin or look at or what would need to be changed?
Controlling edge control points more manually or adding support for node bend points are things we have planned to add in future, and I think either case would satisfy your use case.
However, we do not have the resources to do this in the short term: Both cases require our side to plan how those features would fit in with the model and visual style system (cy.js css).
In the short term, if you want to control where edges are drawn, you have to adjust the positions of the connected nodes -- because the edge positions are inferred between them. The first edge is straight between them, and for 2 or more beziers are used.
If moving node positions does not suffice for your usecase, the first steps would be for us to discuss and plan how this feature would work and how it would fit into the system: https://github.com/cytoscape/cytoscape.js/issues/359
Then if you're interested in implementing it, it would be a straightforward process. We could direct you to the relevant parts of the code that would need to be changed etc over a Google+ call.
Thanks -M
I'm trying to figure out if it's possible to use different row templates for specific rows in an NSPredicateEditor (or, if need be, an NSRuleEditor). I've got a screenshot that I think helps me explain this more clearly.
In this contrived example, I only want people to generate a filter that looks for a specific path above a certain size. So, in Section A (the Any block), users can only specify path rules (and the users can add additional paths). In section B, I only want the Size option to be available.
Nothing's jumping out at me from the docs (or, the stuff that does jump out at me ends up being something else), but it seems like this is the sort of thing that might come in handy, which makes me think it might be possible.
From what I understand about NSPredicateEditor, this is not possible. You might be able to swing it if you do everything yourself with an NSRuleEditor, but I haven't played with that class as much.
So in a nutshell: if you implement it yourself, it's possible. With the built-in stuff, I'm 99.9% certain that it's not a configurable behavior.