Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

TANSTAAFL

Something to get the mental juices flowing (an exercise in AI)

This topic is 6908 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Assuming the stated 2D universe, it follows that the axis of spins of all objects must be perpendicular to the plane of the universe, assuming of course that none of the objects are lines or line segments. This would indicate the necessity of making the tug orbit the chunk in order to make the connection (ooh, evil problem)... unless we can place the tug "over" the chunk due to the statement that collision cannot occur? (in which case this wouldn't be a true 2D universe, but oh well...)

-fel

Share this post


Link to post
Share on other sites
there is no collision problem. we assume that objects with mass take a ghost form, or are all in one infinitesimal point.

if you like, consider that the tug, the chunk, and the collector exist in different parallel planes of 2d space, with the chunk in the plane below the tug, and the collector in the plane below the chunk. the landing claw can reach between these planes, and the collector can reach up one plane to assimilate the chunk.

(in reality, this would normally be a 3d problem, and the positioning would be over the rotational axis of the chunk, but i made it 2d to simplify it, because we would otherwise need to take into account roll and pitch instead of just yaw)

[This message has been edited by TANSTAAFL (edited September 13, 1999).]

Share this post


Link to post
Share on other sites
at first, i was going to disallow the tug knowing its own spin, but i came up with the design of a device that could do it(pretty simply, too)

so we will add a sensor to the tug. it can sense its own exact spin.

Share this post


Link to post
Share on other sites
Secondary goal of exercise is:
- Conservation of fuel
- Speed of retrieval
- Shortest distance
- I don't care, just get the stupid rock
...?

*smile*
- fel

Share this post


Link to post
Share on other sites
for now, we just want to get the stupid rock(teaching the tug to do just this by itself is a complicated task)

fuel is not currently a consideration, although if we solve this problem as is, then we can add in fuel considerations later.

efficiency is a good secondary goal, although there is no time limit currently.

in other words, there is no path cost to consider, but we really dont want to be sloppy about it.
------------------------------------------

some of my own thoughts on this so far.

step 1: detach from the collector
step 2: match velocity with the chunk
step 3: match position with the chunk
step 4: match spin with the chunk
step 5: attach to the chunk
step 6: match velocity with the collector
step 7: match position with the collector
step 8: match spin with the collector
step 9: detach from the chunk(thus allowing collector to assimilate it)
step 10: reattach to the collector

of course, these 10 steps are highly abstracted, and quite far away from "turn on forward thrusters to 45%" and "turn on starboard turning thruster to 96%", which is the level we have to get down to in order to teach the tug to fetch the rock.

Share this post


Link to post
Share on other sites
I'll just grab your steps and add...

step 1: detach from the collector
might want to despin here a bit depending on initial spin velocity

step 2: match velocity with the chunk
don't see how this would work... how would you catch up, especially if it's heading straight away from you as fast as it can? maybe match position first
step 3: match position with the chunk

I would replace 2 and 3 with:
- Locate chunk
- Begin acceleration toward the chunk
- Every interval, calculate distance from chunk and distance from collector. When at half with compensation for velocity of the chunk, start to decelerate. The "halfway" rule is the best in terms of getting there the fastest.
- Every interval, turn toward the chunk if you aren't already facing it. Granted your path will probably wind up parabolic and probably a bit wriggly, but we aren't being retentive about that yet are we? When we get that far we can start using control engineering feedback principles to make this more precise.
- When at chunk, you should be at the velocity of the chunk anyway due to the way acceleration was done, so continue with step 4

step 4: match spin with the chunk
step 5: attach to the chunk


I would probably just repeat the way we got to the chunk to get to the collector, go to step 8.

step 6: match velocity with the collector
step 7: match position with the collector

step 8: match spin with the collector
step 9: detach from the chunk(thus allowing collector to assimilate it)
step 10: reattach to the collector

Thoughts?

-fel
~ some people have an inner child. i have an inner electrical engineer with control engineering training and you just woke her up, darnit TAN... *grin* ~

Share this post


Link to post
Share on other sites
i would still keep my step2 and step3 as they currently are, and here's why:

while the tug cannot directly measure the absolute position or absolute velocity of anything, including itself, she(this is a spacegoing vessel, and therefore a "she") CAN determine the relative positions/velocities by figuring out an arbitrary coordinate system.

at Time=0, the tug is latched to the collector, thus moving with the collector and spinning with the collector. at this point, she knows nothing about the universe, so she has to make certain assumptions:

A: she is currently at her "home base", so she might as well call this position(0,0)
B: she has no sense of absolute direction, any direction will do as a reference, so she calls the direction that she is facing "north" (since she can tell how fast she is spinning, she can determine her "absolute" bearing in the future)
C: since she is latched, she knows that at time=1 that she will still be at (0,0), her velocity is 0, and she is not accelerating, so that will not change.
D: she can sense how far away and in what direction relative to her the chunk lies. she is facing "north" at this moment, so she also knows the chunk's position in her coordinate system.

during time=0, she should perform the single action of disengaging the landing claw.

next, during time=1, she has not moved relative to the collector, so is still at (0,0). she may have spun since time=0, but since she can detect her own spin, she knows what direction she is pointing relative to "north", and thus can translate any relative direction in terms of "north"

again, she detects the distance and direction of the chunk, corrects the angle to make it relative to "north", and plots the new position of the chunk in her coordinate system. this allows her to calculate both the direction(relative to north) and speed in which the chunk is headed.

now, her temporary goal is to adjust her bearing to point the same direction as the the chunk's direction of movement.

so, she must go from her current spin and currnent heading to the chunks heading, and spin of zero.

she can do this a number of ways. if she detects that she is currently spinning, she can wait until she is close to the proper heading and then stop her spin, or she can stop her spin ASAP, and from there induce a small controlled spin to match the heading, or she can determine a "half way" point to do a powered spin, where she applies turning thrusters for half the time in one direction, and the opposite thruster for the other half.

once she is facing the proper direction(or the exact opposite direction, for that matter), she accelerates to match the velocity of the chunk.

once this is achieved, the distance from her to the chunk will remain constant over time, so she must now turn to face either directly towards or directly away from the chunk.

now she can do either a start pulse/stop pulse firing of the thrusters to match the position, or a halfway accel/neg accel powered flight to match position.

once positions are matched, she can then match spin rather easily.

the trip home is exactly the same, the only difference being that the thrusters/turning thrusters are less effective because of more mass.

Share this post


Link to post
Share on other sites
This sortof reminds me of a game that I found not so long ago, it is called RobotBattle, and a few of you might've heard it before. Basically its a bunch of script controlled bots fighting it out on a 2d arena, they can tell their gun, radar and body bearning and the some other basic items like the scan distance of the last scanned object etc. theoretically you might be able to set up a quick experiment using this program to see which one of you's is more 'correct'.

Anyway the whole package, along with some extra info is located at: http://www.robotbattle.com

so yeah, try it.

------------------
-Dom:)
Visit - http://www.eisa.net.au/~sdgrab/contents.html

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!