Player/Stage Path Planning - path

So I have map and config files that represent the world in which my robot is going to be trying to get through. My robot has to get from the top left corner to the bottom right corner of the map without hitting any of the obstacles. I am allowed to work with the map data before sending the robot on it's journey to try and implement path planning.
I have done some research and understand the whole 'Minkowski Sum' concept, as well as the 'Cell Decomposition' techniques, however I am not exactly sure how to work with the map and config data provided by player stage and apply these concepts and use them to get through the maps.
As far as what the robot is, there are 3 different robots. A point robot, and then two more robots (one with 2 degrees of freedom and one with 3), that are rectangular in shape.
Can anyone point me to some example code or something that explains this from a player/stage standpoint? So far I can only find real general things which help me grasp the concepts but not how I would implement them in player/stage.
Thanks guys,
Scott

Scott I'm writing a Motion Planning library that will incorporate pretty much everything you've stated. So far it's using a Coarse (a.k.a Grid) Decomposition. It is written in ActionScript3 and is in very early stages but hopefully it will help. Take a look: http://code.google.com/p/moterpolate/

Related

Lua (Filter Forge) - Trouble implementing roll on a sphere with working yaw and pitch

I am trying to expand on something I had working using just yaw and pitch (rotation and tilt) controls for a mapped sphere. I added a roll component which works for just moving the sphere, but not for keeping the gradients used (via hsl conversion) coordinated with the movements.
Looking for answers online goes straight into math (still struggling with trig) I can't follow well enough to apply to this case. Code gets hashed when inserted. Here is the link to a trimmed down version of the script:
3d sphere v.0.0.1
I honestly do not submit questions with the intent to answer them myself. I just keep hammering at a problem until a solution presents itself. Often answers come via the Filter Forge forums, sometimes through online searches (and often other stack overflow questions I did not find before submitting my own), and more often recently through simple trial and error.
So, yes, I came up with a solution. I was right that the order of operations was the key. There are probably other, better solutions out there, so please share if you have one. It could help whoever finds their way here.
You can see my answer here.

iOs Image Recognition, Categorizing and matching pattern

I have been investigation a little about image recognition, But Haven't found something useful for me yet.
For my Wife who Is a Dentist that has to make his Tesis, I need to make an App that recognize all teeth Shape from a picture taken at standard conditions.
I need to find the best match based on teeth pattern predefined to categorize and see which match best. I know this is a big issue and not a simple solution.
Does someone know an image recognition software that makes me able to give it a a number of patterns, and then have an image and see wich pattern fits the best? Or maybe just some orientation to start searching and working on solving this problem.
Thanks!
OpenCV would be the way to go here but let me give you the facts before you start ripping your hair out.
I don't know your development experience but although OpenCV has an iOS wrapper you will be working with low-level, C libraries. If that makes you uncomfortable then turn back now. Furthermore, you will be writing the majority of the recognition/detection algorithms yourself and it takes a lot of time and patience to get these to the point where they work to an extent. Additionally, don't expect the end product to be all that reliable, professional image recognition/manipulation tools take years of development by teams of experts in computer vision. No disrespect but something that has been hacked together over a few weeks by one person will be sub-par and lacking.
Nonetheless if you want to go ahead, you can download OpenCV for iOS here:
http://docs.opencv.org/2.4/doc/tutorials/introduction/ios_install/ios_install.html

Is it possible to detect human body parts from images?

Is it possible to detect body parts such as head, shoulder, hand, leg, foot from a single image with OpenCV or other image processing libraries?
Front
Side
If possible please provide examples or tutorials, thanks in advance.
Human body part detection is an open field in research. Therefore it is not as easy as adding some magic method from opencv. However there are some approaches that work reasonably well.
Here are some examples: http://202.118.75.4/lu/Paper/T-IP/Pose%20Estimation%20with%20Segmentation%20Consistency.pdf, http://www.wineyard.in/Abstract/mtech/DIP/2015/bp/15D013.pdf,
https://lirias.kuleuven.be/bitstream/123456789/511304/2/3962_postprint.pdf
Anyways it is definitely tricky to get this right and it will certainly fail in some cases.

WebGL Constructive Solid Geometry to Static Vertices

I'm super new to 3D graphics (I've been trying to learn actual WebGL instead of using a framework) and I'm now in the constructive solid geometry phase. I know sites like tinkercad.com use CSG with WebGL, but they have things set so that your design is calculated every time you load the page instead of doing the subtraction, addition and intersection of primitive objects once and then storing those end design vertices for later use. I'm curious if anybody knows why they're doing things that way (maybe just to conserve resources on the server?) and if there isn't some straightforward way of extracting those vertices right before the draw call? Maybe a built in function of WebGL? Haven't found anything so far, when I try logging the object data from gl.bufferData() I'm getting multiple Float32Arrays (one for each object that was unionized together) instead of one complete set of vertices.
By the way, the only github I've found with CSG for WebGL is this https://github.com/evanw/csg.js/ and it's pretty straightforward, however it uses a framework and was curious if you know of any other CSG WebGL code out there that doesn't rely on a framework. I'd like to write it myself either way, but just being able to see what others have done would be nice.

AI for enemy in SpriteKit

I have been making a game in sprite kit for some time now. I have added enemies and am wondering how I can control them around the map using AI(just like in any other game).
What I want is for the enemy to wonder around the TMX map, turning corner depending on random number. I have tried to do this but have run into many problems. Does anyone know of any articles that would help me with this? I have done some research. "PathFinding" and "A*" come up, but with know explanation or sample code on how to do it. Any help would be greatly appreciated.
Welcome to SO. Let me start by saying that I too am currently searching for exactly the same thing. Unfortunately the pickings have been kinda weak, at least what I found so far.
I did find a couple of very interesting reads:
An article on the ghosts behavior of PacMan. Simple but very effective.
Amit’s Game Programming Information. A more general discussion about making games.
Gamasutra. An excellent resources for all things game design.
Designing AI Algorithms For Turn-Based Strategy Games. A Gamasutra article which is extremely useful in explaining turn based AI in plain english.
All these are very useful in their own ways and make you think. However, nothing I have come across provides a plain worded explination on a bad guy's logic (the PacMan article came close). Searching Amazon for Game AI books yields a bunch of books which are extremely expensive and read more like advanced quantum theory.
I ended up deciding on a simple approach for my game. I have my bad guy decide between 2 possible states. Patrol Mode and Attack Mode.
In Patrol Mode he sits idle for a few seconds, walks left or right until he hits a wall or other object, runs (same rules as walking), climbs up and down ladders, and does the occasional jump. I use arc4random() to decide what he does next when his current action is completed. This provides a truly random behavior and makes the bad guy completely unpredictable.
Attack Mode happens when the player is within X distance of the bad guy. The bad guy now has a different set of actions to choose from. Run towards player, swing sword at player, jump up, and so on. Again I use the random function to make the bad guy unpredictable. The results so far have been really excellent. My bad guy behaves like one of those hard to beat 12 year kids playing Halo.
The bad guy will continue to do battle until he dies, the player dies or the player runs away and is no longer within the X distance required for Attack Mode. You can of course fine tune bad guy's behavior by limiting jumping, time between attacks and so on.
Hope this helps and got your creative juices flowing.
The Wikipedia page for the A* Search Algorithm here contains a psuedocode example. All you really need is an understanding of how the algorithm works then you should be able to implement it. Googling for iOS and A* brings up several tutorials.
You have a tile map so it should be relatively easy to do what you want without A* like this bit of psuedocode.
// An Update function for your Enemy
function Update
paths = GetAllPathways()
if paths.length == 0
TurnAround()
else
randomPath = paths.Random()
TurnTowards(randomPath)
endif
MoveForward()
end function
function GetAllPathways()
paths = new Array()
if CanGoForward()
paths.push(forward)
end if
if CanGoLeft()
paths.push(left)
end
if CanGoRight()
paths.push(right)
end
return paths
end function
An algorithm like A* is really for more complex things (not random decision making) where you
can have a complex or dynamic map and want your enemies to target something or the player dynamically which is where A* comes into play, determining a way through the world to find the path to it's target.

Resources