• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

NeoGAF Notebook |OT| Now with 100% more member's members.

Status
Not open for further replies.

Jhoan

Member
Yo OP, I heard you like notebooks so I made you a notebook themed banner about a notebook thread for you to add to the OP:

aedIesq.png
 

Jhoan

Member
Don't think so since OP hasn't given an update. OP should announce a cut-off date soon so we can get the ball rolling on it.
 

Ourobolus

Banned
Well, finally figured out the nearest neighbor problem. Been awhile since I used VBA so it was driving me crazy, so I quickly threw something together with C++.

Disclaimer: It's not necessarily the best route since all Nearest Neighbor does is take each step in the route and find the closest city that it hasn't already visited and uses that, which is why the route goes across Madison to Michigan and Ohio and totally skips Minnesota because it was shorter to go to Michigan, and then the nearest one after that was Ohio (and then Minnesota comes up after Colombia, because it's shorter to go there than to the UK, Hawaii, or Auckland). So it's decent but needs some manual edits to probably make it easier for us.

If anyone has a supercomputer and really wants to do the Traveling Salesman problem for anything more than like 10 cities, then by all means :p

Code:
Los Angeles
Long Beach
La Verne
Inland Empire Community
East Bay
San Francisco
Santa Rosa
Albany
Salem
Portland
Washington
Vancouver
Alberta
Dugway
Fort Collins
Omaha
St Charles
Urbana
Indianapolis
Chicago
Madison
Michigan
Ohio
Buffalo
Pennsylvania
Philadelphia
Brooklyn
New York
New Haven
Connecticut
Newport
Massachusetts
Burlington
Maryland
North Carolina
Spring Lake
South Carolina
Georgia
Atlanta
Tennessee
Florida
Austin
Texas
Mexico
Costa Rica
Colombia
Minnesota
Ontario
United Kingdom
York
Kingston upon Hull
Sheffield
Wirral
Bristol
Weston-super-Mare
Portsmouth
London
Brussels
The Netherlands
North Rhine-Westphalia
Hesse
Germany
Hamburg
Jordan
Saudi Arabia
Pune
New Delhi
Kolkata
Singapore
Manila
Perth
Adelaide
Melbourne
Wellington
New Zealand
Auckland
Kapolei

Now a lot of the cities are approximate (e.g. If someone said "Washington State" I simply used the default pin on Google Maps for that state and got the lat/long from that), so it needs fine tuning for the cities.

EDIT: Looking at the list, it pretty much seems like whomever is in Colombia has the longest distance to ship something regardless of where they ship it to. I suppose it could be reversed too, but then whomever ships to Colombia would be that person. Either way...eh.

If we choose not to use this route, I'm totally ok with it. I just was really bored and it was bothering me. :D
 
Thanks for that bro. It definitely seems like a solid route. I'm going to ship it out most likely by Tuesday or Wednesday. I'm having trouble choosing what to do lol. The pressure is immense.
 
D

Deleted member 22576

Unconfirmed Member
We should put a map on the very back page so everyone can draw a little dot where they are.
 
Code:
Los Angeles
Long Beach
La Verne
Inland Empire Community
East Bay
San Francisco
Santa Rosa
Albany
Salem
Portland
Washington
Vancouver
Alberta
Dugway
Fort Collins
Omaha
St Charles
Urbana
Indianapolis
Chicago
Madison
Michigan
Ohio
Buffalo
Pennsylvania
Philadelphia
Brooklyn
New York
New Haven
Connecticut
Newport
Massachusetts
Burlington
Maryland
North Carolina
Spring Lake
South Carolina
Georgia
Atlanta
Tennessee
Florida
Austin
Texas
Mexico
Costa Rica
Colombia
Minnesota
Ontario
United Kingdom
York
Kingston upon Hull
Sheffield
Wirral
Bristol
Weston-super-Mare
Portsmouth
London
Brussels
The Netherlands
North Rhine-Westphalia
Hesse
Germany
Hamburg
Jordan
Saudi Arabia
Pune
New Delhi
Kolkata
Singapore
Manila
Perth
Adelaide
Melbourne
Sydney
Wellington
New Zealand
Auckland
Kapolei

Added in Sydney. Come on man, I'm at the top of the Aus list in the OP and you missed me! :p
 

Ourobolus

Banned
Sorry, I had it in there as "Point 19" (I don't know why it ended up like that), and forgot to add it into the script. I think it is safe to say where you would end up. :p

EDIT: Huh. It just now occurred to me that I should add usernames...I'll get to it tonight.
 
Happy to host it in Maine and pay postage heading out to the UK (as a vaguely video game related expense I could even have it Fed Ex'd on the company's dime). PM me if you'd like the assist.
 

Ourobolus

Banned
Long post!

Updated:
Code:
[B]Bakersfield[/B]	KhalifaJayy
[B]Los Angeles[/B]	Jangaroo + NaotaFakuza 
[B]Long Beach[/B]	Poyunch
[B]La Verne[/B]	inisignia16
[B]Inland Empire Community[/B]	bjork
[B]EastBay[/B]	MrBig
[B]San Francisco[/B]	Wenis
[B]Santa Rosa[/B]	Jtwo
[B]Chico[/B]	OrlanisWorks
[B]Albany[/B]	GraveHorizon
[B]Salem[/B]	pikachu Lv 5
[B]Portland[/B]	iShouldGoPro
[B]Washington[/B]	meijiko
[B]Vancouver[/B]	Nether!
[B]Alberta[/B]	Biskie
[B]Dugway[/B]	PaulExcellent
[B]FortCollins[/B]	Pops Maellard
[B]Omaha[/B]	Palmer v1
[B]StCharles[/B]	Bright Side of Life
[B]Urbana[/B]	Soka
[B]Indianapolis[/B]	snacknuts
[B]Chicago[/B]	Bay Maximus
[B]Madison[/B]	MaritalWheat
[B]Michigan[/B]	TheProfessor234
[B]Ohio[/B]	TheBrain76
[B]Buffalo[/B]	INDIGO_CYCLOPS
[B]Pennsylvania[/B]	EmmanuelMunoz
[B]Philadelphia[/B]	Ace Harding
[B]Brooklyn[/B]	.GqueB.
[B]NewYork[/B]	Alcotholic + Jipan + xkramz
[B]Trumbull[/B]	eLZhi
[B]NewHaven[/B]	cwmartin
[B]Newport[/B]	Wherearemahdragonz
[B]Massachusetts[/B]	battousai11 + Taco_Human + Pegosaurus
[B]Burlington[/B]	maxcriden
[B]Maryland[/B]	Ourobolus + Chibits12
[B]NorthCarolina[/B]	Vipershark
[B]SpringLake[/B]	Charles Alan Ratliff
[B]SouthCarolina[/B]	Cheddahz
[B]Georgia[/B]	LuffyZoro + Pinko Marx + TheAbsolution + Vanillalite
[B]Decatur[/B]	Kyledk05
[B]Atlanta[/B]	Zoba + CliqWriter
[B]Nashville[/B]	silentcapybara
[B]FortWorth[/B]	CarpeDeezNutz
[B]Texas[/B]	besada + abstract alien
[B]Austin[/B]	Servbot24
[B]Mexico[/B]	Joseca
[B]Florida[/B]	HUELEN10 + Sub Zero at a Starbucks + Tesseract + Matt Attack + PrimaNocta
[B]Costa Rica[/B]	Fireblend
[B]Colombia[/B]	SourCinnamon
[B]Minnesota[/B]	NJDEN
[B]Ontario[/B]	Mr.F + tell yourself
[B]Maine[/B]	BriareosGAF
[B]United Kingdom[/B]	BGBW + comedian + Cynostic  + ItsThatAsianBoy
[B]York[/B]	Mister_Bubbles
[B]KingstonuponHull[/B]	Jill Sandwich
[B]Sheffield[/B]	hodgy100
[B]Wirral[/B]	Jibbed
[B]Bristol[/B]	Edwards_Omatic
[B]Weston-super-Mare[/B]	phisheep
[B]Portsmouth[/B]	Tashbrooke
[B]London[/B]	Tattooth
[B]Brussels[/B]	Jindrax
[B]The Netherlands[/B]	Divius + ShinHayase
[B]NorthRhine-Westphalia[/B]	Symax
[B]Hesse[/B]	Nezumi
[B]Germany[/B]	ganbareneopokekun
[B]Hamburg[/B]	Bufbaf
[B]Munich[/B]	sankt_Antoni0
[B]Helsinki[/B]	Noisepurge
[B]Jordan[/B]	Naked Snake
[B]Saudi Arabia[/B]	Shikari
[B]Pune[/B]	Mister0079
[B]NewDelhi[/B]	scsa
[B]Kolkata[/B]	iamcool388
[B]Singapore[/B]	adelante
[B]Manila[/B]	TheGoddamn
[B]Perth[/B]	Beaniedude
[B]Adelaide[/B]	Lucian Cat
[B]Melbourne[/B]	r1chard
[B]Sydney[/B]	Origami Superman
[B]Brisbane[/B]	Gazunta
[B]Auckland[/B]	catmincer
[B]New Zealand[/B]	lastplayed
[B]Wellington[/B]	Sarquiss_
[B]Kapolei[/B]	johnny_park

Missing because I don't have cities, or included, but I still don't have cities:
  • 898
  • libregkd
  • Fatal Futanari
  • HUELEN10
  • Sub Zero at a Starbucks
  • Tesseract
  • Matt Attack
  • PrimaNocta
  • LuffyZoro
  • Pinko Marx
  • TheAbsolution
  • Vanillalite
  • Chibits12
  • Ourobolus (I KNOW, I KNOW)
  • battousai11
  • Taco_Human
  • Pegosaurus
  • TheProfessor234
  • NJDEN
  • Vipershark
  • TheBrain76
  • MikeDown
  • EmmanuelMunoz
  • Cheddahz
  • OceanicAir
  • besada
  • abstract alien
  • meijiko
  • POWERSPHERE
  • Hasardeur
  • Johnny Dazzle
  • Paper Fox
  • Wazzy
  • Mr. F
  • tell yourself
  • Fireblend
  • ganbareneopokekun (not gonna lie, I hate typing your name)
  • Naked Snake
  • Divius
  • ShinHayase
  • lastplayed
  • adelante
  • Shikari
  • BGBW
  • comedian
  • Cynostic
  • ItsThatAsianBoy

Don't have locations, period.
  • _illmatic_
  • Aprico
  • Bit-Bit
  • BlueSteel
  • Broken Joustick
  • Chezzymann
  • daffy
  • Discoid
  • DiscoVampire
  • ElbowRocket
  • entrement
  • Erhtih
  • Face it Tiger..
  • Filthy Slug
  • Gamerloid
  • Gav
  • hipbabboom
  • hypernima
  • ichor
  • InfiniteBento
  • javac
  • Jzero
  • Laughing Banana
  • Like the Hat?
  • MichaelFassbender
  • Monocle
  • Newline
  • Nokagi
  • pants
  • Ryaaan14
  • Rayis
  • Riposte
  • rokkerkory
  • Sanjuro
  • Schadenfreude
  • SolsticeZero
  • Tambini
  • TheSinkingKnight
  • Ubermatik
  • Westraid
  • yogloo
  • YosemiteHam
 
My actual city is Mary Esther, Florida. I know we have some other floridagaffers but I'll probably be the northwestern-most floridian in this list.
 

Nezumi

Member
I'm not on the missing city list, but I'm gonna add that Hesse is the state I live in. The actual city is Bad Soden am Taunus.
 

cynostic

Member
I'm listed as no city, but I'm in London, UK which is on the map (also posted my location last page, but think it got mixed up)

Good job guys! Can't wait for this.
 

Ourobolus

Banned
Just let me know when we are about to start and I'll make a new list with everyone who has responded.

Also, if anyone is interested in what I wrote up for this and wants to do it themselves, here's what I came up with (probably not the most optimal solution, but eh).

Code:
#include <iostream>
#include <cmath>
#include <algorithm>

using namespace std;

int main()
{
   double longitude[100] = {-2.0774,-0.0600,-1.2967,-1.4618,0.1824,0.6325,-1.8032,0.0923,3.0523,1.8120,0.7868,-2.0346,-2.1487,-1.4892,2.0221,2.4190,2.5301,-2.0463,-2.0470,-2.0637,-2.1418,-2.1366,-2.0629,-2.0554,-2.7586,-2.1486,-2.1411,-2.1474,-2.1073,-1.9678,-1.8341,-1.7436,-1.7059,-1.6755,-1.5797,-1.6526,-1.5603,-1.4940,-1.5294,-1.5395,-1.5037,-1.4470,-1.5111,-1.4227,-1.4470,-1.4728,-1.4166,-1.3783,-1.3791,-1.3376,-1.3119,-1.3473,-1.3767,-1.2907,-1.2916,-1.2728,-1.2756,-1.2446,-1.2459,-1.2778,0.0760,0.1599,0.1744,0.1337,1.5422,1.3478,1.2890,3.0502,3.0504,-0.0452,-0.0059,-0.0021,-0.0189,-0.0520,-0.0546,-0.0189,-0.0257,2.1116};
   
   double latitude[100] = {0.6174,0.9665,0.0798,0.1702,0.8930,0.5338,0.3608,0.9099,-0.7138,0.0236,0.4169,0.9413,0.8598,0.8945,-0.5577,-0.6096,-0.6600,0.5878,0.5946,0.5943,0.6709,0.6593,0.5894,0.5952,0.3724,0.7791,0.7945,0.7844,0.8334,0.7020,0.7083,0.5580,0.5283,0.7200,0.6770,0.8156,0.7518,0.7734,0.7309,0.7001,0.6941,0.7054,0.6199,0.4828,0.5613,0.5890,0.5906,0.6138,0.6241,0.6815,0.6973,0.7191,0.7485,0.7095,0.7106,0.7210,0.7261,0.7241,0.7401,0.7762,0.8875,0.8840,0.9346,0.8977,0.3940,0.4998,0.3232,-0.6431,-0.7206,0.8980,0.9380,0.8990,0.8869,0.8962,0.9315,0.9418,0.9317,0.2548};
   
   string city[100] = {"Bakersfield","United Kingdom","Colombia","Costa Rica","Germany","Jordan","Mexico","The Netherlands","New Zealand","Singapore","Saudi Arabia","Alberta","Vancouver","Ontario","Perth","Adelaide","Melbourne","East Bay","Inland Empire Community","Los Angeles","Santa Rosa","San Francisco","Long Beach","La Verne","Kapolei","Albany","Portland","Salem","Washington","Dugway","Fort Collins","Texas","Austin","Omaha","St Charles","Minnesota","Madison","Michigan","Chicago","Urbana","Indianapolis","Ohio","Tennessee","Florida","Georgia","Atlanta","South Carolina","Spring Lake","North Carolina","Maryland","Philadelphia","Pennsylvania","Buffalo","Brooklyn","New York","New Haven","Connecticut","Newport","Massachusetts","Burlington","Brussels","Hesse","Hamburg","North Rhine-Westphalia","Kolkata","New Delhi","Pune","Auckland","Wellington","Bristol","Kingston upon Hull","London","Portsmouth","Weston-super-Mare","Wirral","York","Sheffield","Manila"};
   
   string nearest[100]; //new list of cities   
   double lat_new[100]; //new list of latitudes
   double long_new[100]; //mew list of longitudes
   
   int j = 0;
   int i = 0;
   double distance = 0;
   double min_dist = 0;
   double dLong;
   double dLat;
   double aHarv;
   double cHarv;
   int count = 0;
   nearest[0]=city[0]; //set the start point
   lat_new[0]=latitude[0];
   long_new[0]=longitude[0]; 
   bool flag=true;
   cout<<nearest[0]<<"\n";    
    
    for(count=1; count<sizeof(city)/sizeof(*city); count++) //iterate for each city that ends up in nearest[]
    {
        while(i<(sizeof(city)/sizeof(*city)+1) && flag) //iterate per city in city[]
        {
            dLong = longitude[i]-long_new[count-1]; 
            dLat = latitude[i]-lat_new[count-1];
            aHarv = pow(sin(dLat/2.0),2.0)+cos(lat_new[count-1])*cos(latitude[i])*pow(sin(dLong/2),2);
            cHarv = 2*atan2(sqrt(aHarv),sqrt(1.0-aHarv));
            distance = cHarv*6371; //Haversine formula
            for(j=0; j<count; j++) //checks to see if city is currently in nearest
            {
                if(city[i]==nearest[j])
                {
                    flag=false; //if found in nearest[], flag false
                }
            }
            
            if(flag) //if city is not found in nearest, see if the distance is the minimum
            {
                if(i==1 || min_dist==0) //if the first time through, make distance minimum
                {
                    min_dist=distance;
                    nearest[count]=city[i];
                    lat_new[count] = latitude[i];
                    long_new[count] = longitude[i];                    
                }
                else if(min_dist>distance) //if new distance is smaller than minimum, set it to minimum
                {
                    min_dist=distance;
                    nearest[count]=city[i];
                    lat_new[count] = latitude[i];
                    long_new[count] = longitude[i];
                }
            }
            i++; 
            flag=true;
        }
        i=0; //reset variables
        min_dist=0;
        cout<<nearest[count]<<"\n";
    }

return 0;
}
 
My living situation may be changing in the coming weeks so I think I may have to retire my spot on the list. Don't want to be the one who loses the book, lol. Apologies for the inconvenience. I'll update if anything changes (or doesn't).
 

adelante

Member
So...is this still happening or wat.

Just let me know when we are about to start and I'll make a new list with everyone who has responded.

Also, if anyone is interested in what I wrote up for this and wants to do it themselves, here's what I came up with (probably not the most optimal solution, but eh).
This is what I love about GAF, people who'd bother with this kinda shit haha Awesome work!
 
I think we need a deadline. That's just my opinion, just so we can be fully prepped to begin this little epic. :)

I'd propose maybe two weeks from today (monday). Just throwing it out there.
 
Status
Not open for further replies.
Top Bottom