Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 33 34 [35] 36 37 ... 201  All

Author Topic: Random Stuff  (Read 1166139 times)

0 Members and 1 Guest are viewing this topic.

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9187
    • View Profile
Re: Random Stuff
« Reply #850 on: October 04, 2013, 03:56:57 pm »
+3

Logged

liopoil

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2587
  • Respect: +2479
    • View Profile
Re: Random Stuff
« Reply #851 on: October 04, 2013, 04:08:33 pm »
0

source?
Logged

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9187
    • View Profile
Re: Random Stuff
« Reply #852 on: October 04, 2013, 04:28:11 pm »
+1

source?

Did you try coming up with the answers?
1) Never----
2) Going----
3) To-------
4) Give-----
5) You-----
6) Up------
Logged

liopoil

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2587
  • Respect: +2479
    • View Profile
Re: Random Stuff
« Reply #853 on: October 04, 2013, 04:30:08 pm »
0

well yeah, I did get the answers. I didn't think of them like a sentence though...
Logged

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2707
    • View Profile
Re: Random Stuff
« Reply #854 on: October 04, 2013, 04:32:33 pm »
+5

Here's the source.
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9187
    • View Profile
Re: Random Stuff
« Reply #855 on: October 04, 2013, 04:33:26 pm »
0

Here's the source.

I should have thought of that.  ::)
Logged

liopoil

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2587
  • Respect: +2479
    • View Profile
Re: Random Stuff
« Reply #856 on: October 04, 2013, 04:43:49 pm »
0

oh wow. I only just got it. That was a good one.
Logged

SirPeebles

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3249
  • Respect: +5460
    • View Profile
Re: Random Stuff
« Reply #857 on: October 04, 2013, 05:51:14 pm »
+2

« Last Edit: October 04, 2013, 05:53:05 pm by SirPeebles »
Logged
Well you *do* need a signature...

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2707
    • View Profile
Re: Random Stuff
« Reply #858 on: October 04, 2013, 06:19:20 pm »
+3

I remember when my math would have me complete the square to solve equations.  That took forever.  Then they were saying how you could complete the square to the generic form of a quadratic equation to make the quadratic formula.  Way easier to use.

There was another type of question that was taking me ages to do, finding the distance from a point to a line.  They told me to find the line perpendicular to the original line going through the point, finding the point they intersect at, then use the distance formula to find the distance.  I was thinking, why not do the same thing for this as completing the square?  I thought it wouldn't take too long, and to show how long it took, I will put it here:

Equation for line:
y1 = ax1 + b1, point: (x, y) (as per Table's suggestion, I am renaming these x's and y's)

Equation of perpendicular line:
y1 = -x1/a + b2 (b2 is equal to y + x/a, but my original notes didn't insert it until later, so that's what I'll do here.)

Solving for x1:
ax1 + b1 = -x1/a + b2
x1 = a(b2 - b1)/(a2 + 1)

Now let's replace b2 with y+x/a (and call b1 b now):
a(y + x/a - b)/(a2 + 1)
(ay + x - ab)/(a2 + 1)

So, y1 is x1 times a, + b:
((ay + x - ab)/(a2 + 1))(a) + b
(a2y + ax - a2b) + a2b + b
(a2y + ax + b)/(a2 + 1)

Now, let's put this into the distance formula:
sqrt(((ay + x - ab)/(a2 + 1) - x)2 + ((a2y + ax + b)/(a2 + 1) - y)2)

Now, let's simplify that a bit, taking the x part:
(ay + x - ab)/(a2 + 1) - x
ay + x - ab - a2x - x
(a2x + ay - ab)/(a2 + 1)

And the y part:
(a2y + ax + b)/(a2 + 1) - y
a2y + ax + b - a2y - y
(ax + b - y)/(a2 + 1)

So, squaring and adding these:
((a2x + ay - ab)/(a2 + 1))2 + ((ax + b - y)/(a2 + 1))2
((a2x + ay - ab)/(a2 + 1))2
a2y2 - 2a2by - 2a3xy + a2b2 + a3xb + a4x2
((ax + b - y)/(a2 + 1))2
a2x2 + 2abx - 2axy + b2 - 2by + y2
(I'm rearranging this for the ease of future simplification)
a4x2 + a2x2 + 2a3bx + 2abx - 2a3xy - 2axy - 2a2by - 2by + a2b2 + b2 + a2y2 + y2

Now, at this point, I couldn't find a way to simplify it further.  I put it in wolframalpha to figure out the simplest form of it.  After I figured that out, I realized how to simplify it.  First, factor all this:

a2x2(a2 + 1) + 2abx(a2 + 1) - 2axy(a2 + 1) - 2by(a2 + 1) + b2(a2 + 1) + y2(a2 + 1)

Factor out the (a2 + 1)

(a2 + 1)(a2x2 + 2abx - 2axy - 2by + b2 + y2)

If you paid attention, the second term here is the same as the square of the numerator of y1, so it turns into this:

(a2 + 1)(ax + b - y)2

Putting this back into the original equation gives us this:

sqrt(((a2 + 1)(ax + b - y)2)/(a2 + 1)2)
(sqrt(a2 + 1))(ax + b - y)/(a2 + 1)
(ax + b - y)/sqrt(a2 + 1)

EDIT: so, you need to take the absolute value of either the numerator of this or the whole answer, whichever you feel like.


So yay, a formula for the distance from a point to a line.  This is way easier than the long method.  I think I deserve extra math points for figuring this out on paper, and not making any mistakes.  And, the sad thing is, this is probably pretty easy compared to more advanced stuff...
« Last Edit: October 07, 2013, 07:18:27 pm by sudgy »
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3349
    • View Profile
Re: Random Stuff
« Reply #859 on: October 04, 2013, 08:18:52 pm »
+1

So yay, a formula for the distance from a point to a line.  This is way easier than the long method.  I think I deserve extra math points for figuring this out on paper, and not making any mistakes.  And, the sad thing is, this is probably pretty easy compared to more advanced stuff...

Nicely done. I once did the same thing for finding the generic quadratic of the form y=ax2+bx+c which went through three given points (all having different x values). That one took a little while, I ended up sitting at my cousin's 18th birthday party scrawling notes on the back of a paper plate as I worked it out, but I did get it to work. I'm sure with my improved knowledge of maths nowadays I could simply my solution.

Things like this are an excercise in putting together what you know into an interesting application. What you've found would be extremely useful in, for example, programming, where such a formula would be how a computer program finds such a distance. But compared to advanced mathematics they don't even properly compare. This is an application of (relatively) basic ideas, while higher level maths is much more about developing ideas into more complex methods. Of course, you can and should still do the same things there - using those more advanced methods, generalising and making interesting theorems and ideas from them.

I would recommend in the future, that you always avoid labelling things with the same variable if possible. So calling your first equation y = ax + b, call the point (u,v). Then your second (perpendicular) equation becomes y = -x/a + v + u/a, and there's no confusion, right from the start.
« Last Edit: October 04, 2013, 08:29:48 pm by Tables »
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

SirPeebles

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3249
  • Respect: +5460
    • View Profile
Re: Random Stuff
« Reply #860 on: October 04, 2013, 09:18:30 pm »
+2

Suppose you'd like to find a parabola passing through (a,u), (b,v), and (c,w) where a, b, and c are distinct.

We do this by writing our parabola as a sum of three other parabolas y = y1 + y2 + y3, where the latter parabolas pass through the following points

y1:  (a,u)   (b,0)   (c,0)
y2:  (a,0)   (b,v)   (c,0)
y3:  (a,0)   (b,0)   (c,w)

Let's start with y1.  We can get a parabola passing through (b,0) and (c,0) by just taking (x-b)(x-c).  Now to get it through (a,u) we just need to rescale it to take on the value u at x=a.

y1 = u*[ (x-b)(x-c) ]/[ (a-b)(a-c) ]

Then do the same for the other two:

y2 = v*[ (x-a)(x-c) ]/[ (b-a)(b-c) ]
y3 = w*[ (x-a)(x-b) ]/[ (c-a)(c-b) ]
Logged
Well you *do* need a signature...

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2707
    • View Profile
Re: Random Stuff
« Reply #861 on: October 04, 2013, 10:51:29 pm »
0

So yay, a formula for the distance from a point to a line.  This is way easier than the long method.  I think I deserve extra math points for figuring this out on paper, and not making any mistakes.  And, the sad thing is, this is probably pretty easy compared to more advanced stuff...

Nicely done. I once did the same thing for finding the generic quadratic of the form y=ax2+bx+c which went through three given points (all having different x values). That one took a little while, I ended up sitting at my cousin's 18th birthday party scrawling notes on the back of a paper plate as I worked it out, but I did get it to work. I'm sure with my improved knowledge of maths nowadays I could simply my solution.

Isn't that the quadratic formula?  My math book explained the whole way of doing that then made me do it for several lessons afterwards...

Also, I didn't think about that for the x and y.  That's a good idea.
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3349
    • View Profile
Re: Random Stuff
« Reply #862 on: October 04, 2013, 11:24:17 pm »
0

So yay, a formula for the distance from a point to a line.  This is way easier than the long method.  I think I deserve extra math points for figuring this out on paper, and not making any mistakes.  And, the sad thing is, this is probably pretty easy compared to more advanced stuff...

Nicely done. I once did the same thing for finding the generic quadratic of the form y=ax2+bx+c which went through three given points (all having different x values). That one took a little while, I ended up sitting at my cousin's 18th birthday party scrawling notes on the back of a paper plate as I worked it out, but I did get it to work. I'm sure with my improved knowledge of maths nowadays I could simply my solution.

Isn't that the quadratic formula?  My math book explained the whole way of doing that then made me do it for several lessons afterwards...

Also, I didn't think about that for the x and y.  That's a good idea.

No, the quadratic formula is basically reverse engineering parabolas - in a parabola, you take x and it ouputs a y. With the quadratic formula by tweaking the c value (assuming you use y=ax2+bx+c, you effectively input y and it outputs the x values (if any exist*) which give that y. This is about creating a new equation just given a few points.

*Assuming you're working with real numbers, otherwise things let a little more fun.

Suppose you'd like to find a parabola passing through (a,u), (b,v), and (c,w) where a, b, and c are distinct.

We do this by writing our parabola as a sum of three other parabolas y = y1 + y2 + y3, where the latter parabolas pass through the following points

y1:  (a,u)   (b,0)   (c,0)
y2:  (a,0)   (b,v)   (c,0)
y3:  (a,0)   (b,0)   (c,w)

Let's start with y1.  We can get a parabola passing through (b,0) and (c,0) by just taking (x-b)(x-c).  Now to get it through (a,u) we just need to rescale it to take on the value u at x=a.

y1 = u*[ (x-b)(x-c) ]/[ (a-b)(a-c) ]

Then do the same for the other two:

y2 = v*[ (x-a)(x-c) ]/[ (b-a)(b-c) ]
y3 = w*[ (x-a)(x-b) ]/[ (c-a)(c-b) ]

This is amazing and awesome and also way simpler than the method I used (mine involved using the average slopes between different points in some way to find the value of a then worked from there somehow)
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

WalrusMcFishSr

  • Minion
  • *****
  • Offline Offline
  • Posts: 642
  • An enormous walrus the size of Antarctica
  • Respect: +1793
    • View Profile
Re: Random Stuff
« Reply #863 on: October 05, 2013, 12:12:43 am »
+1

This is directed at the user "pingpongsam":

Your name reminds me of the intro song to one of the Strong Bad emails where he sings, "My name is not Email Sam, ooh aah, so please don't call me Email Sam, ooh aah." It even works because your name isn't Email Sam. It's pingpongsam.

Just thought you should know.

Logged
My Dominion videos: http://www.youtube.com/user/WalrusMcFishSr   <---Bet you can't click on that!

ashersky

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2343
  • 2013/2014/2015 Mafia Mod of the Year
  • Respect: +1520
    • View Profile
Re: Random Stuff
« Reply #864 on: October 05, 2013, 09:52:30 am »
+1

Anyone here read Flatland?  Seems like a book f.dsers would like.
Logged
f.ds Mafia Board Moderator

2013, 2014, 2015 Mafia Mod of the Year
2015 f.ds Representative, World Forum Mafia Championships
2013, 2014 Mafia Player of the Year (Tie)

11x MVP: M30, M83, ZM16, M25, M38, M61, M76, RMM5, RMM41, RMM46, M51

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2707
    • View Profile
Re: Random Stuff
« Reply #865 on: October 05, 2013, 12:11:28 pm »
0

Anyone here read Flatland?  Seems like a book f.dsers would like.

Oh yeah, I did, I liked it a lot.
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3349
    • View Profile
Re: Random Stuff
« Reply #866 on: October 05, 2013, 12:50:41 pm »
0

Anyone here read Flatland?  Seems like a book f.dsers would like.

Yeah, it was interesting.
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

mail-mi

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1298
  • Shuffle iT Username: mail-mi
  • Come play some Forum Mafia with us!
  • Respect: +1364
    • View Profile
Re: Random Stuff
« Reply #867 on: October 05, 2013, 02:02:02 pm »
0

Anyone here read Flatland?  Seems like a book f.dsers would like.
I watched it in math once.
Logged
I currently imagine mail-mi wearing a dark trenchcoat and a bowler hat, hunched over a bit, toothpick in his mouth, holding a gun in his pocket.  One bead of sweat trickling down his nose.

'And what is it that ye shall hope for? Behold I say unto you that ye shall have hope through the atonement of Christ and the power of his resurrection, to be raised unto life eternal, and this because of your faith in him according to the promise." - Moroni 7:41, the Book of Mormon

pingpongsam

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1760
  • Shuffle iT Username: pingpongsam
  • Respect: +777
    • View Profile
Re: Random Stuff
« Reply #868 on: October 05, 2013, 02:09:52 pm »
+1

This is directed at the user "pingpongsam":

Your name reminds me of the intro song to one of the Strong Bad emails where he sings, "My name is not Email Sam, ooh aah, so please don't call me Email Sam, ooh aah." It even works because your name isn't Email Sam. It's pingpongsam.

Just thought you should know.


That I randomly chose to read this thread and skipped to this page to see where it all went only to see this must mean something, right?
Logged
You are the brashest scum player on f.ds.

shraeye

  • Minion
  • *****
  • Offline Offline
  • Posts: 690
  • Shuffle iT Username: shraeye
  • More Graph Theory please
  • Respect: +299
    • View Profile
Re: Random Stuff
« Reply #869 on: October 05, 2013, 03:08:22 pm »
0

read 'Shape of Space' by Jeffery Weeks.  It's flatland-like
Logged

SirPeebles

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3249
  • Respect: +5460
    • View Profile
Re: Random Stuff
« Reply #870 on: October 05, 2013, 03:11:18 pm »
0

read 'Shape of Space' by Jeffery Weeks.  It's flatland-like

Is it still a satirical piece of social commentary, or is just some geeky geometry thing?
Logged
Well you *do* need a signature...

shraeye

  • Minion
  • *****
  • Offline Offline
  • Posts: 690
  • Shuffle iT Username: shraeye
  • More Graph Theory please
  • Respect: +299
    • View Profile
Re: Random Stuff
« Reply #871 on: October 05, 2013, 03:14:42 pm »
0

read 'Shape of Space' by Jeffery Weeks.  It's flatland-like

Is it still a satirical piece of social commentary, or is just some geeky geometry thing?
Nope, just math; I wrote a knot theory thesis about some of his thinkings.
Logged

shraeye

  • Minion
  • *****
  • Offline Offline
  • Posts: 690
  • Shuffle iT Username: shraeye
  • More Graph Theory please
  • Respect: +299
    • View Profile
Re: Random Stuff
« Reply #872 on: October 06, 2013, 10:49:20 am »
0

Yo, I found this game Manufactoria. Have you guys seen this?

http://www.kongregate.com/games/PleasingFungus/manufactoria

It's basically Turing Machines: The Game. Kind of maddening, but in a good sort of way, and I liked it so much I played through the whole thing. I thought that the algorithmically-minded crowd around here might appreciate it.
I got a question about this.  I'm working on my programs, cool and good.  I succeed from time to time.  When I fail, the program gives me a clear indication of precisely the type of string I'm judging incorrectly.  However...when I succeed, the program shows me a single bot moving around, but gives like 3 or more ticker-tapes that I'm 'reading'.  It seems to only follow the first.  What the hell are the second/third guys about?  What is the Simon Says symbol that jumps from tape to tape?
Logged

Asper

  • Governor
  • *****
  • Offline Offline
  • Posts: 4995
  • Respect: +5347
    • View Profile
Re: Random Stuff
« Reply #873 on: October 06, 2013, 12:01:43 pm »
0

well yeah, I did get the answers. I didn't think of them like a sentence though...

I did both, but my sentence didn't make much sense because i used "leaving" as "coming"'s antonym...
Logged

WalrusMcFishSr

  • Minion
  • *****
  • Offline Offline
  • Posts: 642
  • An enormous walrus the size of Antarctica
  • Respect: +1793
    • View Profile
Re: Random Stuff
« Reply #874 on: October 06, 2013, 12:26:47 pm »
0

Yo, I found this game Manufactoria. Have you guys seen this?

http://www.kongregate.com/games/PleasingFungus/manufactoria

It's basically Turing Machines: The Game. Kind of maddening, but in a good sort of way, and I liked it so much I played through the whole thing. I thought that the algorithmically-minded crowd around here might appreciate it.
I got a question about this.  I'm working on my programs, cool and good.  I succeed from time to time.  When I fail, the program gives me a clear indication of precisely the type of string I'm judging incorrectly.  However...when I succeed, the program shows me a single bot moving around, but gives like 3 or more ticker-tapes that I'm 'reading'.  It seems to only follow the first.  What the hell are the second/third guys about?  What is the Simon Says symbol that jumps from tape to tape?

It might just be one tape that wraps around to the next line? There's only one robot tested at a time, but sometimes the input tape is too long to fit in one row. The multicolored symbol just indicates the current position of the writer head. Maybe I'm misunderstanding you.
Logged
My Dominion videos: http://www.youtube.com/user/WalrusMcFishSr   <---Bet you can't click on that!
Pages: 1 ... 33 34 [35] 36 37 ... 201  All
 

Page created in 0.064 seconds with 21 queries.