6 Degrees Of Wikipedia

This may or may not have come up recently due to my circumstances; I don’t think me blogging about my efforts is going to significantly improve anyone else’s chances when it comes to the moment.

6 Degrees of Wikipedia A researcher at Trinity College Dublin has software that lets users map the links between Wikipedia pages. His Web site is called “Six Degrees of Wikipedia,” modeled after. The degree symbol or degree sign, °, is a typographical symbol that is used, among other things, to represent degrees of arc (e.g. In geographic coordinate systems), hours (in the medical field), degrees of temperature, alcohol proof, or diminished quality in musical harmony.

The idea in principal is dead simple: Given a page on Wikipedia how many steps/links/pages does it take to get to a given second page?

We don’t care how we get there, there is no need to record the route, just count how many steps. The only other rule is you have to go from A -> B, you can’t start at both ends and converge somewhere in the middle, i.e. A -> C <- B.

I really thought I’d have this nailed. I’ve done so much with Ruby and Mechanize in the past and this was an ideal fit. But I found this quite a humbling experience. For whatever reason (could have perhaps been the cat relentlessly pawing at the door) I lost my cool in the last thirty minutes of the ninety minutes allotted time, shut down a bit and stopped thinking/communicating out loud, and just couldn’t get my brain to work: I knew what I was trying to do, but couldn’t even communicate that to myself, let alone anyone else.

Degrees

Here’s exactly what I had when time was up:

Not pretty is it? Doesn’t work, at all. It’s more like a collection of random thoughts. Like I said: a humbling experience. But how it nagged me. I couldn’t leave it like that when I knew I had the right idea somewhere in my brain.

This is what I had a few hours later:

Which worked in principal, but was extremely slow and memory inefficient. I had to kill it before I got a result as it was using too much of the 1GB total I had on Linode.

You can see (maybe) what I was trying to with my initial attempt, i.e:

  1. Keeping track of the previous levels urls
  2. Keeping track of the current levels urls
  3. Keeping track of urls checked so time isn’t wasted checking them again

The current level becomes the next previous level when we reach the end, etc.

You can also see bits that I knew were a problem and that were inefficient, but that I didn’t really care about because I was sure I could figure them out later if need be (I.e. I didn’t see them as the main problem):

  • Filtering out irrelevant links. I.e. all the header and footer links on a Wikipedia page which aren’t anything to do with the article itself.
  • Checking all the links at the end of a step - slower than checking on the fly.

I decided to use Redis as a more memory efficient alternative to Ruby arrays for my final attempt for that day (by that point it was purely an effort for my own self-esteem). Redis is really awesome, by the way:

This was good enough to get it to run reasonably ok on the resources I had, but I knew improvements could still be made. That would have to wait for another day though as it was bedtime; I hadn’t worked on this constantly that evening, I’d had other stuff to do.

Next, I figured out what I’d said to myself in a comment and managed to used Redis’s built in databases for both the previous and current levels meaning I could easily switch between them. I also made it command line callable to make it a bit easier to use.

The next attempt was to use threading. I realised that, since I would have concurrent threads going on, I couldn’t use multiple Redis databases as each thread could override the database selection made in another thread and things would get very messy. I decided to use Redis Sets instead in just one database. The mechanize bit became a separate function to make threading it easier - I.e. I could extend this to three instances/threads easily. I also added in better feedback (counting down urls remaining).

In making the threaded version I discovered the need for better error handling, e.g. checks for images and checks for a successful page load: On a single thread I never had failure of the program to work; However, after adding threads (before I put in the page load check) it would blitz through, but not always find the result. I.e. some page loads must have failed, but been lost in the begin/rescue. This approach made sure to re-add the page to the list to be checked if the page failed to load.

I also realised I had lied to myself when I’d commented “No way not to avoid an array at some point”.

However, GIL is still a thing so threading was not providing any performance benefits which prompted a fairly trivial switch from threads to processes instead. This represents the final state of the program; Obviously further improvements are possible, but I was happy enough with everything in principal.

I decided to chuck some resources at the processes version and see if I could speed things up. The original task I had been set was to go from the Wikipedia Ruby page to the David Bowie page. But whilst developing this program I checked for a known single step of Ruby to Metastable (The Ruby page links to Diamond, which links to Metastable).

Best mac os 9 emulator. On a two-core system:

On a four-core system:

So the additional processes are definitely helping. Mind you, doing six levels deep would be crazy on a single machine as it turns out David Bowie is only two levels deep and on a four-core with four processes this still took: 108m6.189/173m5.299/7m24.900.

(Redirected from 6 Degrees Of Freedom)
The six degrees of freedom: forward/back, up/down, left/right, yaw, pitch, roll
6 Degrees Of Wikipedia

Six degrees of freedom (6DoF) refers to the freedom of movement of a rigid body in three-dimensional space. Specifically, the body is free to change position as forward/backward (surge), up/down (heave), left/right (sway) translation in three perpendicularaxes, combined with changes in orientation through rotation about three perpendicular axes, often termed yaw (normal axis), pitch (transverse axis), and roll (longitudinal axis). Three degrees of freedom (3DOF), a term often used in the context of virtual reality, refers to tracking of rotational motion only: pitch, yaw, and roll.[1][2]

Robotics[edit]

Serial and parallel manipulator systems are generally designed to position an end-effector with six degrees of freedom, consisting of three in translation and three in orientation. This provides a direct relationship between actuator positions and the configuration of the manipulator defined by its forward and inverse kinematics.

Robot arms are described by their degrees of freedom. This is a practical metric, in contrast to the abstract definition of degrees of freedom which measures the aggregate positioning capability of a system.[3]

In 2007, Dean Kamen, inventor of the Segway, unveiled a prototype robotic arm[4] with 14 degrees of freedom for DARPA. Humanoid robots typically have 30 or more degrees of freedom, with six degrees of freedom per arm, five or six in each leg, and several more in torso and neck.[5]

Engineering[edit]

The term is important in mechanical systems, especially biomechanical systems for analyzing and measuring properties of these types of systems that need to account for all six degrees of freedom. Measurement of the six degrees of freedom is accomplished today through both AC and DC magnetic or electromagnetic fields in sensors that transmit positional and angular data to a processing unit. The data is made relevant through software that integrates the data based on the needs and programming of the users.

Mnemonics to remember angle names

The six degrees of freedom of a mobile unit are divided in two motional classes well as described below ;

Translational envelopes :

  1. Moving forward and backward on the X-axis. (Surge)
  2. Moving left and right on the Y-axis. (Sway)
  3. Moving up and down on the Z-axis. (Heave)

Rotational envelopes :

  1. Tilting side to side on the X-axis. (Roll)
  2. Tilting forward and backward on the Y-axis. (Pitch)
  3. Turning left and right on the Z-axis. (Yaw)

Operational envelope types[edit]

There are three types of operational envelope in the Six degrees of freedom. These types are Direct, Semi-direct (conditional) and Non-direct, all regardless of the time remaining for the execution of the maneuver, the energy remaining to execute the maneuver and finally, if the motion is commanded via a biological entity (e.g. human), a robotical entity (e.g. computer) or both.

  1. Direct type: Involved a degree can be commanded directly without particularly conditions and described as a normal operation. (An aileron on a basic airplane)
  2. Semi-direct type: Involved a degree can be commanded when some specific conditions are met. (Reverse thrust on an aircraft)
  3. Non-direct type: Involved a degree when is achieved via the interaction with its environment and cannot be commanded. (Pitching motion of a vessel at sea)

6 Degrees Of Wikipedia

Transitional type also exists in some vehicles. For example, when the Space Shuttle operates in space, the craft is described as fully-direct-six because its six degrees can be commanded. However, when the Space Shuttle is in the earth's atmosphere for its return, the fully-direct-six degrees are no longer applicable for many technical reasons.

Game controllers[edit]

6 Degrees Of Wikipedia

Six degrees of freedom also refers to movement in video game-play.

First-person shooter (FPS) games generally provide five degrees of freedom: forwards/backwards, slide left/right, up/down (jump/crouch/lie), yaw (turn left/right), and pitch (look up/down). If the game allows leaning control, then some consider it a sixth DoF; however, this may not be completely accurate, as a lean is a limited partial rotation.

Wikipedia

The term 6DoF has sometimes been used to describe games which allow freedom of movement, but do not necessarily meet the full 6DoF criteria. For example, Dead Space 2, and to a lesser extent, Homeworld and Zone Of The Enders allow freedom of movement.

Some examples of true 6DoF games, which allow independent control of all three movement axes and all three rotational axes, include Elite Dangerous, Shattered Horizon, the Descent franchise, Retrovirus, Miner Wars, Space Engineers, Forsaken and Overload (from the same creators of Descent). The space MMO Vendetta Online also features 6 degrees of freedom.

Motion tracking devices such as TrackIR are used for 6DoF head tracking. This device often finds its places in flight simulators and other vehicle simulators that require looking around the cockpit to locate enemies or simply avoiding accidents in-game.

The acronym 3DoF, meaning movement in the three dimensions but not rotation, is sometimes encountered.

The Razer Hydra, a motion controller for PC, tracks position and rotation of two wired nunchucks, providing six degrees of freedom on each hand.

The SpaceOrb 360 is a 6DOF computer input device released in 1996 originally manufactured and sold by the SpaceTec IMC company (first bought by Labtec, which itself was later bought by Logitech).

6 Degrees Of Wikipedia Game

The controllers sold with HTC VIVE provide 6DOF information by the lighthouse, which adopts Time of Flight (TOF) technology to determine the position of controllers.

Longest 6 Degrees Of Wikipedia

See also[edit]

  • Degrees of freedom (mechanics) – Number of independent parameters that define the configuration or state of a mechanical system.
  • Degrees of freedom problem – The multiple ways for multi-joint objects to realize a movement
  • Geometric terms of location – Directions or positions relative to the shape and position of an object
  • Ship motions – Terms connected to the 6 degrees of freedom of motion

References[edit]

  1. ^Batallé, Jordi (12 February 2013). 'An Introduction to Positional Tracking and Degrees of Freedom (DOF)'. Road to VR. Retrieved 20 October 2019.
  2. ^'Degrees of Freedom | Google VR |'. Google Developers. Retrieved 20 October 2019.
  3. ^Paul, Richard P., Robot Manipulators: Mathematics, Programming, and Control, MIT Press, 1981.
  4. ^'Luke, a new prosthetic arm for soldiers'. ted.com. 2007-03-01. Retrieved 2017-02-26.
  5. ^Craig, John J., Introduction to Robotics: Mechanics and Control, Addison-Wesley, 1986.

6 Degrees Of Wikipedia

Retrieved from 'https://en.wikipedia.org/w/index.php?title=Six_degrees_of_freedom&oldid=1001638396'