# Dominion Strategy Forum

• July 23, 2019, 03:21:36 am
• Welcome, Guest

### News:

DominionStrategy Wiki

Pages: 1 ... 39 40 [41] 42  All

0 Members and 1 Guest are viewing this topic.

#### silverspawn

• Governor
• Offline
• Posts: 4189
• Respect: +1843
« Reply #1000 on: May 08, 2019, 06:59:28 am »
0

I was wondering about that when I first heard about the story
Logged

#### silverspawn

• Governor
• Offline
• Posts: 4189
• Respect: +1843
« Reply #1001 on: May 11, 2019, 05:03:06 pm »
0

Check this out: GPT-2 can do math. You can probably tell which part was written by me and which part was auto-completed, but someone who isn't a mathematician might not be able to. And this latex code it produced actually compiles (if I take out the double $$). Proof. Let v \in V be a vector such that S_1 ... S_n v = 0. Since S_1 is injective, it follows that S_2 ... S_n v = 0. Generally, suppose S_j ... S_n v = 0. Since S_j is injective, it follows that S_{j+1} ... S_n = 0. Inductively, it follows that v = 0. So \mathbb{R}_6 is bounded by R_6 such that S_{j+1} \to \ldots \ldots = 0. Here's a proof of the "free path equation" on the basis of a very simple example. In its simplest form, this formula allows us to solve the differential equation$$\sum_{j=1}^j \frac{k}{s^2 + u_j/2}\log{c} \frac{s^2 + u_j/2}{c} = \frac{s^2 + u_{ij+1} + u_y}\log \frac{s}{c}$.$$We can expand this proof further to show that as$\theta$gets larger, the distance gets smaller, the area goes up, and the density increases by a factor of$\log \cos{A^T)}\$ and that this is what leads to the "free path equation."
Logged

#### hhelibebcnofnena

• Apprentice
• Offline
• Posts: 290
• Respect: +167
« Reply #1002 on: May 11, 2019, 10:16:16 pm »
+2

Cool! This got me intrigued, so I fed it two lines of python code, and it produced something which looked a lot like a programming language, but if it was, it wasn't python. It even included comments, though, so it must be better than I am!

This is what it produced:

"""

def handleAllowedArgs ( self , * args , ** kwargs ):

parsestring = self .filter(parsestring) // If not all args have the same name, do nothing

raise ArgumentError ( ' Unallowed args ' )

def _apply ( t ):

"""

Applies the given argument to the object or the result of

the applied function to the current argument.

Args must be objects.

"""

assert __name__ == ' __main__ '

return self .apply(t, dict ())

def checkArgument ( self , * args , ** kwargs ):

assert issemememop( self , args) or isinstance ( self .__class__ . __name__ , ( dict , list , tuple )):

raise ArgumentError ( " Argument is not a list. " )

assert __name__ == ' __main__ '

def checkIsFunction ( self , * args , ** kwargs ):

raise ArgumentError ( " Is a function not declared by the program. " )

def checkIsArgument ( self , * args , ** kwargs ):

raise Exception ( ' Argument is not an argument

I think it ran out of characters or something here. But that missing parenthesis and quote mark is really bothering me.
Logged
Hydrogen Helium Lithium Beryllium Boron Carbon Nitrogen Oxygen Fluorine Neon Sodium

#### silverspawn

• Governor
• Offline
• Posts: 4189
• Respect: +1843
« Reply #1003 on: May 12, 2019, 07:31:01 am »
0

Yeah, it often just ends mid-sentence. I think there's just a character limit.

note also that this is only a watered down version of the original, but it's still pretty impressive.
Logged

#### hhelibebcnofnena

• Apprentice
• Offline
• Posts: 290
• Respect: +167
« Reply #1004 on: May 13, 2019, 09:30:49 pm »
0

So silverspawn has gotten me playing with this program. I entered a prompt which didn't really have anything to do with math(s), but it decided I wanted a mathematical proof of something relating to prime numbers.

This is one line:

p + q + 2 = q = 5 p q: p = 5 + q + 3 = q = 5 - 2 = 3

My favorite part of this is "5 + q + 3 = q".  At least it gets "5 - 2 = 3" right. Apparently this neural network cannot do even the simplest algebra. It is amusing though. Perhaps someday neural networks will be able to write something which sounds reasonable.
Logged
Hydrogen Helium Lithium Beryllium Boron Carbon Nitrogen Oxygen Fluorine Neon Sodium

#### sudgy

• Cartographer
• Offline
• Posts: 3375
• It's pronounced "SOO-jee"
• Respect: +2636
« Reply #1005 on: May 13, 2019, 11:32:28 pm »
+1

2,3,5,7,11,13,17,19,23,29,31,33,36,40,44,47,51,57,59,62,65,69,73,83,86,89,100,101,104,107,110,116,117,113,115,117,114,119,124,124,125,126,128,132

Can you guess where I stopped?
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

#### silverspawn

• Governor
• Offline
• Posts: 4189
• Respect: +1843
« Reply #1006 on: May 14, 2019, 05:15:16 am »
+1

Apparently this neural network cannot do even the simplest algebra. It is amusing though. Perhaps someday neural networks will be able to write something which sounds reasonable.

Related Slate Star Codex post:

Quote
Here’s a fun question: the human brain is undoubtedly the most powerful computer in the known universe. In order to do something as simple as scratch an itch it needs to solve exquisitely complex calculus problems that would give the average supercomputer a run for its money. So how come I have trouble multiplying two-digit numbers in my head?

The brain isn’t directly doing math, it’s creating a model that includes math and somehow doing the math in the model. This is hilariously perverse. It’s like every time you want to add 3 + 3, you have to create an entire imaginary world with its own continents and ecology, evolve sentient life, shepherd the sentient life into a civilization with its own mathematical tradition, and get one of its scholars to add 3 + 3 for you. That we do this at all is ridiculous. But I think GPT-2 can do it too.

Janelle Shane asks GPT-2 its ten favorite animals:

Prompt: My 10 favorite animals are: 1.

My ten favorite animals are:
1. Zebras with a white scar on the back
2. Insiduous spiders and octopus
3. Frog with large leaves, hopefully black
4. Cockatiel with scales
5. Razorbill with wings hanging about 4 inches from one’s face and a heart tattoo on a frog
3. Cockatric interlocking tetrabods that can be blind, cut, and eaten raw:
4. Black and white desert crocodiles living in sunlight
5. Zebra and many other pea bugs

Forget the particular animals for now (don’t worry, the razorbill with wings hanging about 4 inches from one’s face will be back in your nightmares). Notice the way it numbers its list: 1, 2, 3, 4, 5, 3, 4, 5. Last week the two-year-old child who lives next to me counted 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 8, 9, 7, 8, 9, 7, 8, 9 (his mother warns this is an inexact transcription). GPT-2 is instantiated on giant supercomputers; it’s a safe bet they could calculate the square root of infinity in a picosecond. But it counts more or less the same way as a two-year old. GPT-2 isn’t doing math. It’s doing the ridiculous “create a universe from first principles and let it do the math” thing that humans do in their heads. The fact that it counts so badly suggests it’s counting human-style, which makes it amazing that it can count at all.
Logged

#### Cuzz

• Minion
• Offline
• Posts: 552
• Respect: +902
« Reply #1007 on: May 14, 2019, 10:36:20 am »
+4

2,3,5,7,11,13,17,19,23,29,31,33,36,40,44,47,51,57,59,62,65,69,73,83,86,89,100,101,104,107,110,116,117,113,115,117,114,119,124,124,125,126,128,132

Can you guess where I stopped?

Man this thing sucks at computing powers of 2.
Logged

#### silverspawn

• Governor
• Offline
• Posts: 4189
• Respect: +1843
« Reply #1008 on: June 01, 2019, 08:16:12 am »
0

I'm somewhat confused about complex numbers right now. Or rather about how WolframAlpha deals with them, which is presumably the correct way.

If I ask for solutions to the equation x^5 = 1, it gives me all the complex numbers with angles n * 72°, n = 0,1,2,3,4. (Left.) If I ask for solutions to the equation x^{5/2} = 1, it gives me the ones with n = 0, 2, 3. (Right)

So what exactly is the property that the points with angles 72° and 288° don't have?

Logged

#### heron

• Saboteur
• Offline
• Posts: 1024
• Respect: +1147
« Reply #1009 on: June 01, 2019, 11:45:00 am »
0

I'm somewhat confused about complex numbers right now. Or rather about how WolframAlpha deals with them, which is presumably the correct way.

If I ask for solutions to the equation x^5 = 1, it gives me all the complex numbers with angles n * 72°, n = 0,1,2,3,4. (Left.) If I ask for solutions to the equation x^{5/2} = 1, it gives me the ones with n = 0, 2, 3. (Right)

So what exactly is the property that the points with angles 72° and 288° don't have?

This isn't a great reason, but if you multiply 72 or 288 by 2.5 you get 180 mod 360. It's not a great reason because if you multiply (72 + 360) by 2.5 you get 360 again.
Logged

#### Cuzz

• Minion
• Offline
• Posts: 552
• Respect: +902
« Reply #1010 on: June 01, 2019, 12:14:36 pm »
+1

I'm somewhat confused about complex numbers right now. Or rather about how WolframAlpha deals with them, which is presumably the correct way.

If I ask for solutions to the equation x^5 = 1, it gives me all the complex numbers with angles n * 72°, n = 0,1,2,3,4. (Left.) If I ask for solutions to the equation x^{5/2} = 1, it gives me the ones with n = 0, 2, 3. (Right)

So what exactly is the property that the points with angles 72° and 288° don't have?

It’s because the function which raises a complex number to the fifth power is a real function, whereas the function which raises a complex number to the 5/2 power is not, it’s a doubly valued multifunction. In all 5 of these cases, one of the two values of the multifunction is 1, but only in the three given solutions is 1 the *principal* value of the multifunction.
Logged

#### silverspawn

• Governor
• Offline
• Posts: 4189
• Respect: +1843
« Reply #1011 on: June 01, 2019, 01:44:05 pm »
0

I'm somewhat confused about complex numbers right now. Or rather about how WolframAlpha deals with them, which is presumably the correct way.

If I ask for solutions to the equation x^5 = 1, it gives me all the complex numbers with angles n * 72°, n = 0,1,2,3,4. (Left.) If I ask for solutions to the equation x^{5/2} = 1, it gives me the ones with n = 0, 2, 3. (Right)

So what exactly is the property that the points with angles 72° and 288° don't have?

It’s because the function which raises a complex number to the fifth power is a real function, whereas the function which raises a complex number to the 5/2 power is not, it’s a doubly valued multifunction. In all 5 of these cases, one of the two values of the multifunction is 1, but only in the three given solutions is 1 the *principal* value of the multifunction.

When you say double valued multifuction, you mean a function p : \C -> \powerset(\C) defined by p(c) = {[first square root of c^5], [second square root of c^5]}?

So what's the definition / consensus on what is the principal value?
Logged

#### Watno

• Margrave
• Offline
• Posts: 2730
• Respect: +2948
« Reply #1012 on: June 01, 2019, 02:11:32 pm »
0

This isn't a great reason, but if you multiply 72 or 288 by 2.5 you get 180 mod 360. It's not a great reason because if you multiply (72 + 360) by 2.5 you get 360 again.

It's also not true: 288*2.5 = 720, while 216 * 2.5 = 240.
Logged

#### heron

• Saboteur
• Offline
• Posts: 1024
• Respect: +1147
« Reply #1013 on: June 01, 2019, 02:18:06 pm »
0

This isn't a great reason, but if you multiply 72 or 288 by 2.5 you get 180 mod 360. It's not a great reason because if you multiply (72 + 360) by 2.5 you get 360 again.

It's also not true: 288*2.5 = 720, while 216 * 2.5 = 240.

Well, fair enough.
Logged

#### Cuzz

• Minion
• Offline
• Posts: 552
• Respect: +902
« Reply #1014 on: June 01, 2019, 04:39:14 pm »
+3

I'm somewhat confused about complex numbers right now. Or rather about how WolframAlpha deals with them, which is presumably the correct way.

If I ask for solutions to the equation x^5 = 1, it gives me all the complex numbers with angles n * 72°, n = 0,1,2,3,4. (Left.) If I ask for solutions to the equation x^{5/2} = 1, it gives me the ones with n = 0, 2, 3. (Right)

So what exactly is the property that the points with angles 72° and 288° don't have?

It’s because the function which raises a complex number to the fifth power is a real function, whereas the function which raises a complex number to the 5/2 power is not, it’s a doubly valued multifunction. In all 5 of these cases, one of the two values of the multifunction is 1, but only in the three given solutions is 1 the *principal* value of the multifunction.

When you say double valued multifuction, you mean a function p : \C -> \powerset(\C) defined by p(c) = {[first square root of c^5], [second square root of c^5]}?

So what's the definition / consensus on what is the principal value?

Yeah that's one way to think about it (though the more proper and technical setting for this involves Riemann surfaces).

To define principal values, we need to talk about arguments, logarithms, and power functions.

The argument of a complex number is its angle in the complex plane measured in radians from the positive real axis. Of course, this is not a single number, but a set of numbers, denoted arg z, since, e.g., 0 and 2pi refer to the same angle. So we single out one of these angles to be called the principal argument, which (more or less arbitrarily) is the angle A in arg z satisfying -pi < A <= pi.

Then we note that we can write a complex number z in exponential notation, as z = r*e^(i*a), where r=|z| is the modulus and a is one of the arguments of z. Here we can choose any of the arguments of z, since the complex exponential function is periodic with period 2*pi*i (for the same reason that adding 2*pi to an angle gives the same angle). This means in particular that the complex exponential function is no longer one-to-one as the real exponential function is, and hence the inverse function (the logarithm) is not a real function.

But we decide that we want to talk about logarithms anyway, so we define it as a multifunction--the log of a nonzero complex number z is now the set of complex numbers which exponentiate to z. It turns out that log z = log (re^ia) = ln|z| + i*arg z, where ln denotes the real logarithm of the positive real number |z| and arg z is again the full set of arguments of z. This is an infinite set, since arg z is an infinite set of angles differing by multiples of 2pi. If we insist on defining at a single-valued version of the log function, we by convention usually use the principle argument A, which gives the principal branch of the log function, denoted Log. That is, Log z = ln|z| + i*A.

This now lets us define power functions. Given z and another complex number c, we can define z^c by z^c = e^(c*logz) = e^(c*ln|z| + i*c*arg z). Since log is multi-valued, the power function typically is as well, but we can single one of these out by using the principal branch of the log function, e^(c*Log z) = e^(c*ln|z| + i*c*A). It happens to be the case that the power function is infinitely-valued unless c is rational, in which case it has as many values as the denominator of c written in lowest terms. When c is an integer, the denominator is 1, so power functions with integer exponents are in fact all single-valued.

So for example, let's apply this to some of your numbers. The number z_1 at angle 72 degrees has principal argument of 2pi/5 radians, and a modulus of 1, so the principal value of z_1^(5/2) is

z_1^(5/2) = e^(5/2*ln(1) + i*(5/2)*(2pi/5)) = e^(i*pi)=-1.

The number z_3 at angle 3*72 = 216 degrees has argument of 6pi/5 radians, but its principal argument is -4pi/5. Its modulus is also 1, so the principal value of z_3^(5/2) is

z_3^(5/2) = e^(5/2*ln(1) + i*(5/2)*(-4pi/5)) = e^(i*(-2pi))=1.

But remember that this whole principal business is rather arbitrary. Using the argument 12pi/5 for z_1 gives

z_1^(5/2) = e^(5/2*ln(1) + i*(5/2)*(12pi/5)) = e^(i*6pi)=1,

and using the argument 6pi/5 for z_3 gives

z_3^(5/2) = e^(5/2*ln(1) + i*(5/2)*(6pi/5)) = e^(i*3pi)=-1.

« Last Edit: June 01, 2019, 06:41:51 pm by Cuzz »
Logged

#### silverspawn

• Governor
• Offline
• Posts: 4189
• Respect: +1843
« Reply #1015 on: June 01, 2019, 05:37:17 pm »
+1

Thanks! This is a quality explanation.

Your ln(0)s have to be ln(1)s, right?
Logged

#### silverspawn

• Governor
• Offline
• Posts: 4189
• Respect: +1843
« Reply #1016 on: June 01, 2019, 05:51:06 pm »
0

I don't like staring at source code to learn something, so I made a texed version of your explanation.

You even explained how to do exponentiation of two complex numbers, which I've wondered about for a while. You'd think they'd teach that in Analysis lectures, but nope.
Logged

#### Cuzz

• Minion
• Offline
• Posts: 552
• Respect: +902
« Reply #1017 on: June 01, 2019, 06:42:02 pm »
0

Thanks! This is a quality explanation.

Your ln(0)s have to be ln(1)s, right?

yep, fixed
Logged

#### Cuzz

• Minion
• Offline
• Posts: 552
• Respect: +902
« Reply #1018 on: June 01, 2019, 06:51:09 pm »
0

I don't like staring at source code to learn something, so I made a texed version of your explanation.

You even explained how to do exponentiation of two complex numbers, which I've wondered about for a while. You'd think they'd teach that in Analysis lectures, but nope.

They do in complex analysis courses! It's an incredibly beautiful subject that I highly recommend taking a course in if you get the chance.
Logged

#### Tables

• Margrave
• Offline
• Posts: 2758
• Build more Bridges in the King's Court!
• Respect: +3252
« Reply #1019 on: June 16, 2019, 04:19:38 pm »
0

In another side of Maths, today I tried to convert an annual inflation rate into a daily one by taking it's log base 365. I got chewed out pretty hard for that one.
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.
I hereby declare myself the best dominion player in the world. Obviously.

#### sudgy

• Cartographer
• Offline
• Posts: 3375
• It's pronounced "SOO-jee"
• Respect: +2636
« Reply #1020 on: June 24, 2019, 03:44:27 pm »
0

The physicist's proof for the derivative of ex:

(ex + h - ex)/h = ex(eh - 1)/h.  Because h is small, eh = 1 + h, so ex(eh - 1)/h = ex(1 + h - 1)/h = ex(h/h) = ex.
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

#### hhelibebcnofnena

• Apprentice
• Offline
• Posts: 290
• Respect: +167
« Reply #1021 on: June 24, 2019, 05:00:07 pm »
0

The physicist's proof for the derivative of ex:

(ex + h - ex)/h = ex(eh - 1)/h.  Because h is small, eh = 1 + h, so ex(eh - 1)/h = ex(1 + h - 1)/h = ex(h/h) = ex.

What prevents that from working with any number other than e?
Logged
Hydrogen Helium Lithium Beryllium Boron Carbon Nitrogen Oxygen Fluorine Neon Sodium

#### silverspawn

• Governor
• Offline
• Posts: 4189
• Respect: +1843
« Reply #1022 on: June 24, 2019, 05:04:11 pm »
0

The physicist's proof for the derivative of ex:

(ex + h - ex)/h = ex(eh - 1)/h.  Because h is small, eh = 1 + h, so ex(eh - 1)/h = ex(1 + h - 1)/h = ex(h/h) = ex.

What prevents that from working with any number other than e?
I'd say, the same thing that prevents it from working with e. The "because e is small" handwaving. The argument isn't correct just because it leads to the correct result.
Logged

#### hhelibebcnofnena

• Apprentice
• Offline
• Posts: 290
• Respect: +167
« Reply #1023 on: June 24, 2019, 05:09:27 pm »
0

The physicist's proof for the derivative of ex:

(ex + h - ex)/h = ex(eh - 1)/h.  Because h is small, eh = 1 + h, so ex(eh - 1)/h = ex(1 + h - 1)/h = ex(h/h) = ex.

What prevents that from working with any number other than e?
I'd say, the same thing that prevents it from working with e. The "because e is small" handwaving. The argument isn't correct just because it leads to the correct result.

Isn't that "because h is small" handwaving the basis of derivatives in the first place? What distinguishes one from the other?
Logged
Hydrogen Helium Lithium Beryllium Boron Carbon Nitrogen Oxygen Fluorine Neon Sodium

• Governor
• Offline
• Posts: 4189