This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2012-09-11 07:10:01

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Six Degrees of Separation

I contacted Lightnin about it.

Lightnin wrote:

Actually, we've just added a Master's in Engineering student to our team who is planning on looking at this! Thing is, there may be regulations about sharing the data with people outside of our research team. Can you paste this into an email and send it to help@scratch? I'll pass it on to the new researcher, and let them know you are interested in similar things.

big_smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#27 2012-09-11 08:38:32

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Six Degrees of Separation

Hardmath123 wrote:

I contacted Lightnin about it.

Awesome!

Lightnin wrote:

Thing is, there may be regulations about sharing the data with people outside of our research team.

I thought the data was public through the API anyway? Or is he talking about different data...?


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#28 2012-09-11 08:56:38

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Six Degrees of Separation

That's what I told him. Awaiting reply...


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#29 2012-09-11 12:27:04

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Six Degrees of Separation

Nice! Maybe we'll get the results after all  smile

Offline

 

#30 2012-09-19 03:35:38

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Six Degrees of Separation


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#31 2012-09-19 11:28:09

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Six Degrees of Separation

Hardmath123 wrote:

Bump. Something else to explore.

Amazing! That's really a complicated paradox which took me some time to understand.
It makes it even more interesting to make this experiment on Scratch!

Offline

 

#32 2012-09-21 12:15:28

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Six Degrees of Separation

Hmm, I was working on a script to analyze just two levels of friends, and then I realized I could actually cache some results in a file. So if P2S is user id 123456, I could cache 123456 to P2S because he's obviously really popular. Also, I added a few more optimizations. So I've reduced the computation time a lot.

EDIT: @LS97 is it just me or is your sig throwing 404's all over the place?  tongue

Last edited by Hardmath123 (2012-09-21 12:27:34)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#33 2012-09-21 12:57:57

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: Six Degrees of Separation

Here is some pseudo-code for it:

Code:

max-degree-of-separation = 6
the-queue = list("inc-dos", first-user);
already-checked = list();
degree-of-separation = 0
while (!empty(the-queue)){
  user = remove-from-front(the-queue);
  increment = false;
  if (user = "inc-dos"){
    increment = true;
    user = remove-from-front(the-queue);
  }
  add(already-checked, user);
  friends = friends-of;
  for (i = 0; i != length(friends)){
    if (!contains(the-queue, friends[i]) & !contains(the-queue, friends[i]) & has-projects(user)) add-to-end(the-queue, friends[i]);
  }
  if (increment){
    degree-of-separation += 1;
    add-to-end(the-queue, "inc-dos");
    if (degree-of-separation = max-degree-of-separation) break;
  }
}
result = append-lists(the-queue, already-checked);

Remember, it is only pseudo-code so it may require some more work to translate it into an actual language and implement some of those functions.


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#34 2012-09-21 13:39:26

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Six Degrees of Separation

This code I just wrote seems to work okay  smile

Hardmath123 wrote:

and then I realized I could actually cache some results in a file. So if P2S is user id 123456, I could cache 123456 to P2S because he's obviously really popular.

...you mean you weren't doing that already?  tongue  Cache *all* the usernames!  big_smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#35 2012-09-22 16:19:01

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Six Degrees of Separation

Hardmath123 wrote:

@LS97 is it just me or is your sig throwing 404's all over the place?  tongue

Well, we took down Mod Share while we're setting up version 4, so my sig is actually returning a bunch of html pages saying how Mod Share is down  tongue

Offline

 

#36 2012-09-23 06:44:44

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Six Degrees of Separation

blob8108 wrote:

This code I just wrote seems to work okay  smile

Hardmath123 wrote:

and then I realized I could actually cache some results in a file. So if P2S is user id 123456, I could cache 123456 to P2S because he's obviously really popular.

...you mean you weren't doing that already?  tongue  Cache *all* the usernames!  big_smile

Well, I was caching, but not too optimally.

I think as a warm-up-plus-sanity-check, I should test the paradox mentioned above. Let's call the "inner circle" of X the set of friends of X who friended X back. Then on average who has a larger inner circle: X or X's friends? Or X's inner circle?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#37 2012-09-23 08:00:01

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Six Degrees of Separation

I'd definitely get my computer to help with this, it sounds interesting  smile


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

Board footer