Arcane Wonders Forum

Mage Wars => Strategy and Tactics => Topic started by: Sailor Vulcan on April 24, 2014, 09:28:23 PM

Title: I've discovered the Mage Wars equation (I think)
Post by: Sailor Vulcan on April 24, 2014, 09:28:23 PM
I might have discovered the Mage Wars equation. This equation describes all of the possible resource conversions of a single game. A lot of the resources have been chunked together because there wouldn't be enough room for them otherwise. Tell me if I've missed anything.

gf=gi+r|total|*[(m(cavg/r)+(areset)avg/r]+∑(sn∨cn∨mn∨on∨an∨trn∨pn∨tn∨dn∨ln∨0n∨stpn∨phn∨stgn∨rcurrentn)*(r|total|*(a+tr)avg/r)

where:

s=spellbook points

g=the totality of all resources in the game when rcurrent=0, AKA the gamestate. (gi varies with the game mode, the number of players, what board you're using, and the mages chosen for the game.)

c=channeling

m=mana

o=objects

a=activations. (actions, activated ability uses, and non-mandatory enchantment revelations. In this equation a=0 at the end of every round, and the quantity of activations increases by the number of action markers, activated abilities and hidden non-mandatory enchantments on the board during the reset phase, as well as when someone casts "Rouse the Beast", etc.)

Tr=triggers (uses of triggered abilities, including mandatory enchantment revelations and all "passive" abilities like regenerate x, upkeep x, bleed, armor, aegis, resistance, immunity etc.)

p=position (summation of ranges between a single object to all other objects and spells that can affect or be affected by that object either directly or indirectly)

t=tempo

d=damage

l=life

r=round

reset=end of reset phase

i=initial

f=final

avg/r=average per round

stp=current step (The net value of this variable never exceeds 1. stp increases by 1 when a step begins and decreases by 1 when a step ends.)

ph=current phase (The net value of this variable never exceeds 1. ph increases by 1 when a phase begins and decreases by 1 when a phase ends.)

stg=current stage (The net value of this variable never exceeds 1. stg increases by 1 when a stage begins and decreases by 1 when a stage ends.)

rcurrent=current round (The net value of this variable never exceeds 1. rcurrent increases by 1 when a round begins, and decreases by 1 when a round ends.

r|total|=the total number of times a round has been added when rcurrent=0.

--------------------
What do you think?
Title: Re: I've discovered the Mage Wars equation
Post by: Lord0fWinter on April 24, 2014, 09:54:37 PM
Can you perhaps give an example? Like work through the equation with a card, explaining where each number in the final equation comes from?
Title: Re: I've discovered the Mage Wars equation
Post by: Aylin on April 24, 2014, 10:33:06 PM
Can you perhaps give an example? Like work through the equation with a card, explaining where each number in the final equation comes from?

Pretty sure he's just messing with you.
Title: Re: I've discovered the Mage Wars equation
Post by: IndyPendant on April 24, 2014, 10:36:25 PM
This would have been a *perfect* April 1 post...; )
Title: Re: I've discovered the Mage Wars equation
Post by: Zuberi on April 24, 2014, 10:53:19 PM
Quote from: Imaginator
s=gi+r|total|*(mcavg/r+aresetavg/r)]+[{-c, -m, -o, -a, -tr, -p, -t, -d, -l, 0, -stp, -ph, -stg, -rcurrent}+{c, m, o, a, tr, p, t, d, l, 0, stp, ph, stg, rcurrent}]*[r|total|*(a+tr)avg/r]

Close. I recommend abandoning the search, for once you crack this code, your games shall devolve into inputting data into an algorithm and having the winner declared by the computer. This occurred on the show "The Adventure's of Pete and Pete" to the game Kick the Can.
Title: Re: I've discovered the Mage Wars equation
Post by: Sailor Vulcan on April 24, 2014, 10:57:14 PM
Sorry, I noticed a few mistakes and corrected them. Not sure about whether it works to calculate anything as averages per round. Someone will have to check me on that. This doesn't calculate the winner, zuberi. It calculates all paths a game could take, not just the one to one mage's or another's victory. It does not calculate what you should do, only what you can do.
Title: Re: I've discovered the Mage Wars equation
Post by: Sailor Vulcan on April 24, 2014, 11:05:51 PM
And this isn't a joke. I realized that every single thing that occurs in this game is resource management. There is nothing in this game that is not resource management. You can manage your own resources and to an extent your opponents' resources, and so can your opponents. Changing the phase can be considered a neutral resource management, where an end of phase is -ph and the beginning of a new phase is +ph.

Also, there are some constraints on the equation that I did not mention: card text. Card text is the thing that limits what we convert resources to. For instance, when you cast a hidden enchantment, you are spending mana to gain an object with a position and activation associated with it. You cannot spend that enchantment's activation to change its position. However, you can cast shift enchantment, converting an additional quantity of mana into a change in the position of the enchantment.

Also I just fixed another error in the equation. When you remove a card from your spellbook, you are spending spellbook points. When a card comes back to your spellbook, you are gaining spellbook points.
Title: Re: I've discovered the Mage Wars equation
Post by: Aylin on April 24, 2014, 11:18:22 PM
And this isn't a joke.

I'm having a hard time believing this.
Title: Re: I've discovered the Mage Wars equation
Post by: Lord0fWinter on April 24, 2014, 11:35:10 PM
Can you perhaps give an example? Like work through the equation with a card, explaining where each number in the final equation comes from?

Pretty sure he's just messing with you.

That's why I asked for an explanation :) I'm hesitant to believe it, but willing to listen to the reasoning and calculations behind it.
Title: I've discovered the Mage Wars equation
Post by: Sailor Vulcan on April 25, 2014, 12:03:00 AM
I've done a lot of explaining already, but if it wasn't clear...

We begin with the initial game state:

o=28 (this includes all zones, arena walls, and mages
s=120*number of mages
p(mages)=starting corners
p(walls and zones)=self explanatory
a=0
tr=0
m=10*the number of mages
c=combined channeling of all channelers
t=0 since no ones gained or lost any tempo yet
d=0.
l=combined life of all creatures and conjurations, in this case the mages.


Next, you add mana equal to the channeling stat of every round to the game state. You also add activations equal to the total number gained during each reset phase in the game. The notation for this part was ridiculously hard to figure out, so I ended up using mana gained from the average channeling per round, and the average number of activations gained per round. Next, I added the expression for a single most direct resource conversion multiplied by the product of the total number of rounds in the game and the summation of activations and triggers that occurred per round on average.


The expression for the most direct resource conversion has two parts: cost (- values) and gain (+values). Theoretically you could choose any number of costs and any number of gains, but the costs and gains are constrained by card text, as I explained above.

The s= at the beginning is another mistake I just caught. Spellbook points are included in the game state.
Title: Re: I've discovered the Mage Wars equation
Post by: Zuberi on April 25, 2014, 12:08:36 AM
Quote from: Imaginator
It calculates all paths a game could take

Is the answer 42?
Title: Re: I've discovered the Mage Wars equation
Post by: Sailor Vulcan on April 25, 2014, 12:16:48 AM

Quote from: Imaginator
It calculates all paths a game could take

Is the answer 42?

Of course not. This equation represents all the paths the game could take, not just one. Theoretically the game doesn't even need to have an end if the players aren't trying to convert all their resources to damage.  The part with the { , , ...} allows for many, many solutions, just for a single direct resource conversion. You can make such conversions as many times as there are activations in the game. The choice is yours.
Title: Re: I've discovered the Mage Wars equation
Post by: Aylin on April 25, 2014, 12:30:13 AM
The expression for the most direct resource conversion has two parts: cost (- values) and gain (+values). Theoretically you could choose any number of costs and any number of gains, but the costs and gains are constrained by card text, as I explained above.

On the off chance you're being serious, you shouldn't use one variable to represent multiple things. Instead of 'a' and '-a' which is confusing as hell, you could use 'a' and 'A' instead.

As written, in your equation I would take the two vectors you have and simplify that to 0 since it's not clear what you're meaning. And I'm not even even sure you're wanting to use a vector!
Title: Re: I've discovered the Mage Wars equation
Post by: Sailor Vulcan on April 25, 2014, 12:57:14 AM
I wasn't sure how to put "and/or" between every variable in the {}'s.
Title: Re: I've discovered the Mage Wars equation
Post by: Aylin on April 25, 2014, 01:36:54 AM
I wasn't sure how to put "and/or" between every variable in the {}'s.

...what?
Title: Re: I've discovered the Mage Wars equation
Post by: Boocheck on April 25, 2014, 05:46:56 AM
Maybe reason why USA goverment is scanning internet was Imaginator itself!

My mathematic skill are good enough to calculate, how much dmg i deal. I am afraid that is my limit. :)

Mr. Imaginator, can you present here a formula for a happy life? Before ppl in black suits will have a "word" with you? :) Thx :)
Title: Re: I've discovered the Mage Wars equation
Post by: Sailor Vulcan on April 25, 2014, 08:44:32 AM
Maybe reason why USA goverment is scanning internet was Imaginator itself!

My mathematic skill are good enough to calculate, how much dmg i deal. I am afraid that is my limit. :)

Mr. Imaginator, can you present here a formula for a happy life? Before ppl in black suits will have a "word" with you? :) Thx :)


That's a LOT more complicated. There are books and books of scientific research on that. And you'd have to define the words "happy life" first. It's MUCH MUCH more complicated then Mage Wars mechanics.
Title: Re: I've discovered the Mage Wars equation
Post by: Wildhorn on April 25, 2014, 08:52:44 AM
I still don't get what your formula is supposed to gives. The final result represent what? And I can use it for what purpose?
Title: I've discovered the Mage Wars equation
Post by: Sailor Vulcan on April 25, 2014, 10:20:07 AM
I still don't get what your formula is supposed to gives. The final result represent what? And I can use it for what purpose?

The one variable on the left hand side of the equation represents the final game state. I haven't thought of any definite applications yet, although I imagine this equation might be useful for making AI mage wars opponents. However, the notation would have to be altered to distinguish between friendly and enemy resources. Please reread my OP. I've made multiple corrections to it.

Also, I should probably mention that the equation is harder to read on tapatalk since it does not support superscripts and subscripts.
Title: Re: I've discovered the Mage Wars equation
Post by: Aylin on April 25, 2014, 12:19:50 PM
I still don't get what your formula is supposed to gives. The final result represent what? And I can use it for what purpose?

The one variable on the left hand side of the equation represents the final game state. I haven't thought of any definite applications yet, although I imagine this equation might be useful for making AI mage wars opponents. However, the notation would have to be altered to distinguish between friendly and enemy resources. Please reread my OP. I've made multiple corrections to it.

Also, I should probably mention that the equation is harder to read on tapatalk since it does not support superscripts and subscripts.

If you're being serious with this, maybe you should explain how you came up with the gibberish equation in your OP.
Title: Re: I've discovered the Mage Wars equation
Post by: Sailor Vulcan on April 25, 2014, 07:15:52 PM
I still don't get what your formula is supposed to gives. The final result represent what? And I can use it for what purpose?

The one variable on the left hand side of the equation represents the final game state. I haven't thought of any definite applications yet, although I imagine this equation might be useful for making AI mage wars opponents. However, the notation would have to be altered to distinguish between friendly and enemy resources. Please reread my OP. I've made multiple corrections to it.

Also, I should probably mention that the equation is harder to read on tapatalk since it does not support superscripts and subscripts.

If you're being serious with this, maybe you should explain how you came up with the gibberish equation in your OP.

First of all, did you even attempt to read the equation and understand what it says? Or did you just see a bunch of mathematical and logical symbols and think "gibberish". I spent HOURS working on this equation. I've defined ALL of my terms. I've corrected all the errors I've managed to find so far. The only thing in there that I'm not sure of is my use of averages per round when it comes to mana gained from the channeling phase and activations gained from the reset phase.

No one has bothered actually commenting on the actual content of the equation. Everyone's just glanced at it and said "GIBBERISH!" without even READING THE EQUATION. Otherwise I would be reading critiques on the actual mathematical logic that I used. Not a single person has actually pointed out any particular flaws in the equation, only the fact that it's an equation. Keep in mind I worked very hard on this. And I DID explain how I came up with this equation, but in case it's not clear, I will repeat myself in greater detail.

I realized that most things in the game of Mage Wars is a resource or a conversion of resources. After that realization I started jotting down my ideas for what the formula for a single direct conversion of resources might be in Mage Wars. (By direct I mean that all of the resources being converted are only converted once.) I already knew that most resource conversions in mage wars include a cost (negative values) and a gain (positive values). However, I did not know the mathematical symbol for and/or, to indicate the choice between resources for each conversion. I vaguely remembered an algebra class where we learned that all possible solutions for the unknown variable in an equation could be written in a list like this:

x={x1, x2, x3,...}

So I thought that the list separated by commas indicated that any of those x values were possible solutions for x. However, x1 could not be the solution simultaneously to x2, since they were in different places on the coordinate plane. Therefore, I thought a list separated by commas was the equivalent of saying "and/or" between every value on the list. I'm starting to see that a lot of people don't know that notation, or that notation is wrong. That's what I used at first before I started to realize that:

{-m, -a, -p, -t, -d, -l}+{m, a, p, t, d, l}

The variables used here are the main resource categories described in Deckbuilder's article on resources. I thought any resources that I had to account for could all fall under these categories, or would be "placeholders" that would convert to one of these types of resources, like channeling to mana. After that I was struck by another epiphany. If I could multiply this expression for resource conversion in mage wars by the number of times it occurred in the game, I might be able to figure out an equation for all resource conversions in the game. I realized that nearly all if not all chains of resource conversions started with actions and activated abilities

[{-m, -a, -p, -t, -d, -l}+{m, a, p, t, d, l}]*[r*a]

where r=total # of rounds in the game.

Then I realized I had made a mistake. Not all resource conversions were voluntary by one player or the other, even though most chains of resource conversions started off that way. Some resource conversions triggered without anyone choosing to activate them.


[{-m, -a, -p, -t, -d, -l, -tr}+{m, a, p, t, d, l, tr}]*[r*(a+tr)]

(tr=trigger)

I then realized that there were some chains of resource conversions that started with a trigger rather than an activation. They were the free mana and actions triggered during the channeling and reset phases, whose values were equal to the channeling stat and the number of objects with the creature type.

r|total|*(m(cavg/r)+(areset)avg/r


I remembered an article I read once on these forums about resources (not Deckbuilder's) in which resources were described by "order". They described the mage as the first order resource, spellbook points as second order resources, mana and actions as third order, and so on until mage-damage, which is the final order resource.

Eventually I started to realize that it wasn't just most things in the game that could be considered a resource. It was absolutely everything, and by everything I mean everything, including the turn phases. I wasn't sure how to put it all in a single equation because of the great, great diversity of resources in the game, but then I figured I could probably just divide it into categories like Deckbuilder did. Deckbuilder's resource article didn't cover everything. For instance, it didn't cover most traits, it didn't cover turn phases, it didn't cover attack rolls, or armor, or defenses. It also didn't cover creatures as separate resources from their actions, in spite of the fact that a single creature is not a single action, but rather something that generates actions during the reset phase. And it wasn't just creature actions that were generated during the reset phase, but also activated abilities.

I tried categorizing resources a bunch of different ways until I settled on the current variables. At one point I tried using "tra" for traits, but I realized that didn't work very well, and it would overlap with some of the other resource categories too much. I also made sure to include 0 as a resource in the equation, since sometimes you could pay some resources and get nothing out of it (like if the target ceases to be valid), or you might gain something for free (like a free action, or a vine marker during deploy if you're a druid).

Then I realized three big mistakes that I had missed earlier. Firstly, I forgot to include the starting point for all these conversions, the initial game state: gi

The second huge mistake I made was having spellbook points be the variable on the left side of the equation. I realized spellbook points were included in the initial game state, and spellbook points didn't account for all resources in the game. Particularly, it didn't account for the neutral resources and the mages themselves. I finally realized that what I was calculating wasn't merely the paths a game could take--that was just the right side of the equation. The whole thing actually equaled the final game state: gf

The third BIG, BIG mistake I made was that I had forgotten to take variation between resource conversions into account. The way everything was written at this point, every resource conversion would have to be completely identical for the equation to be true. Through trial and error, I eventually figured it out:

∑[(-sn∨-cn∨-mn∨-on∨-an∨-trn∨-pn∨-tn∨-dn∨-ln∨0n∨-stpn∨-phn∨-stgn∨-rcurrentn)+(sn, cn, mn, on, an, trn, pn, tn, dn, ln, 0n, stpn, phn, stgn, rcurrentn)]

And now for the full equation (or at least the latest version):

gfinal=gi+r|total|*(m(cavg/r)+(areset)avg/r+∑[(-sn∨-cn∨-mn∨-on∨-an∨-trn∨-pn∨-tn∨-dn∨-ln∨0n∨-stpn∨-phn∨-stgn∨-rcurrentn)+(sn, cn, mn, on, an, trn, pn, tn, dn, ln, 0n, stpn, phn, stgn, rcurrentn)]*[r|total|*(a+tr)avg/r]


I still need to find out whether it works to multiply averages per round of the mana gained from channeling and actions gained from the reset phase by the total number of current-round periods in the game. (for the purposes of this equation, there is only ever one current round at any time. Starting a round is adding a round, and ending a round is subtracting a round.)

I'm also debating whether to make a separate resource category for dice, since their values are partially determined by chance, which is different from any other resource in the game.

And now I just realized two things that I didn't notice before:

1. There are exactly two game components that are not resources, but affect usage of resources: initiative and card text.
2. Since I'm using the summation symbol, and because the total resources in the game doesn't always stay constant (since you can pay a resource cost to lower your opponent's resources rather than increasing your own, which means that the value of g CAN decrease overall)...that means I can condense the equation even more:

gf=gi+r|total|*(m(cavg/r)+(areset)avg/r+∑(sn∨cn∨mn∨on∨an∨trn∨pn∨tn∨dn∨ln∨0n∨stpn∨phn∨stgn∨rcurrentn)*(r|total|*(a+tr)avg/r)

where:

s=spellbook points

g=the totality of all resources in the game when rcurrent=0, AKA the gamestate. (gi varies with the game mode, the number of players, what board you're using, and the mages chosen for the game.)

c=channeling

m=mana

o=objects

a=activations. (actions, activated ability uses, and non-mandatory enchantment revelations. In this equation a=0 at the end of every round, and the quantity of activations increases by the number of action markers, activated abilities and hidden non-mandatory enchantments on the board during the reset phase, as well as when someone casts "Rouse the Beast", etc.)

Tr=triggers (uses of triggered abilities, including mandatory enchantment revelations and all "passive" abilities like regenerate x, upkeep x, bleed, armor, aegis, resistance, immunity etc.)

p=position (summation of ranges between a single object to all other objects and spells that can affect or be affected by that object either directly or indirectly)

t=tempo

d=damage

l=life

reset=end of reset phase

i=initial

f=final

avg/r=average per round

stp=current step (The net value of this variable never exceeds 1. stp increases by 1 when a step begins and decreases by 1 when a step ends.)

ph=current phase (The net value of this variable never exceeds 1. ph increases by 1 when a phase begins and decreases by 1 when a phase ends.)

stg=current stage (The net value of this variable never exceeds 1. stg increases by 1 when a stage begins and decreases by 1 when a stage ends.)

rcurrent=current round (The net value of this variable never exceeds 1. rcurrent increases by 1 when a round begins, and decreases by 1 when a round ends.

r|total|=the total number of times a round has been added by the end of the game
Title: Re: I've discovered the Mage Wars equation
Post by: Aylin on April 25, 2014, 08:34:14 PM
First of all, did you even attempt to read the equation and understand what it says?

Yes.

Quote
Or did you just see a bunch of mathematical and logical symbols and think "gibberish".

I spent some time trying to figure out just what the hell you were trying to say with your equation. It honestly just looks like a bunch of random mathematical symbols thrown together. Hence, gibberish.

Quote
I spent HOURS working on this equation.

Time spent isn't the only requirement to have something that makes sense.

Quote
No one has bothered actually commenting on the actual content of the equation. Everyone's just glanced at it and said "GIBBERISH!" without even READING THE EQUATION.

I know you're upset about this, but your equation simply does not make sense. I don't even know what you're trying to do with it.

Quote
Otherwise I would be reading critiques on the actual mathematical logic that I used.

There are more options than what you've presented.

Quote
Not a single person has actually pointed out any particular flaws in the equation, only the fact that it's an equation.

That's because no one knows what your equation is supposed to do. You even said you didn't know. How can you expect us to?

Quote
Keep in mind I worked very hard on this. And I DID explain how I came up with this equation, but in case it's not clear, I will repeat myself in greater detail.

None of what you wrote qualifies as an explanation. It would be sufficient for an initial idea into this sort of thing, but not for the finished product. You're claiming to know the "Mage Wars equation", but can't think of any applications for it and haven't tested it at all.

Quote
However, I did not know the mathematical symbol for and/or, to indicate the choice between resources for each conversion. I vaguely remembered an algebra class where we learned that all possible solutions for the unknown variable in an equation could be written in a list like this:

x={x1, x2, x3,...}

As best I can tell, you're referring to a set, though sets don't appear in equations like you have. This makes it ambiguous if you're referring to a vector instead (which would be from Linear Algebra).

Quote
Therefore, I thought a list separated by commas was the equivalent of saying "and/or" between every value on the list. I'm starting to see that a lot of people don't know that notation, or that notation is wrong. That's what I used at first before I started to realize that:

{-m, -a, -p, -t, -d, -l}+{m, a, p, t, d, l}

See, here is part of the reason why it's confusing. It you're referring to sets, then the proper notation would be:

{-m, -a, -p, -t, -d, -l} U {m, a, p, t, d, l} = {+/- m, +/- a, +/- p, +/- t, +/- d, +/- l}

On the other hand, if you're referring to vectors you'd have:

Let A = {m, a, p, t, d, l}

{-m, -a, -p, -t, -d, -l} = -{m, a, p, t, d, l} = -A

-A  + A = 0 (0-vector, which is {0, 0, 0, 0, 0, o} in R 6).

Either way doesn't seem to be what you're intending.

Quote
After that I was struck by another epiphany. If I could multiply this expression for resource conversion in mage wars by the number of times it occurred in the game, I might be able to figure out an equation for all resource conversions in the game. I realized that nearly all if not all chains of resource conversions started with actions and activated abilities

[{-m, -a, -p, -t, -d, -l}+{m, a, p, t, d, l}]*[r*a]

where r=total # of rounds in the game.

So you wanted to multiply your set/vector/thing by the total number of rounds and the total number of activations in the game? Or is it in that round? Or what? You're unclear here.

Quote
Then I realized I had made a mistake. Not all resource conversions were voluntary by one player or the other, even though most chains of resource conversions started off that way. Some resource conversions triggered without anyone choosing to activate them.


[{-m, -a, -p, -t, -d, -l, -tr}+{m, a, p, t, d, l, tr}]*[r*(a+tr)

(tr=trigger)

Similarly, trigger is left ambiguous.

Quote
I then realized that there were some chains of resource conversions that started with a trigger rather than an activation. They were the free mana and actions triggered during the channeling and reset phases, whose values were equal to the channeling stat and the number of objects with the creature type.

r|total|*(m(cavg/r)+(areset)avg/r

Are you saying that areset = the sum of all channeling plus the number of creatures on the board? What makes you so sure of this? How do you know channeling and creatures even relate like this?

Quote
And now for the full equation (or at least the latest version):

gfinal=gi+r|total|*(m(cavg/r)+(areset)avg/r+∑[(-sn∨-cn∨-mn∨-on∨-an∨-trn∨-pn∨-tn∨-dn∨-ln∨0n∨-stpn∨-phn∨-stgn∨-rcurrentn)+(sn, cn, mn, on, an, trn, pn, tn, dn, ln, 0n, stpn, phn, stgn, rcurrentn)]*[r|total|*(a+tr)avg/r]

What the h*** is a summation doing in there? Over what are you summing???


*Sigh.*



You've got a ton of variables in there, yet you haven't explained how they should be represented at all. That's a big part of why this whole thing is just gibberish.

How does one give a value of "tempo", for example? Or how do you determine the value of "gamestate"? You mentioned walls play into this...do you just mean the number or their location? How do passage blocked and LoS blocked change this?

The only thing you've done is thrown a bunch of "variables" together without actually explaining how they relate. Just saying, "oh, all these resources should go here and then I'll multiply them by other stuff for reasons" doesn't give anyone any useful information. And you haven't even gotten to coefficients yet!



I don't mean any of this as an attack on you personally. I understand what it's like to put time into things and get nothing in return. However, I'm not going to lie to you and say it's great when it doesn't even make sense.
Title: Re: I've discovered the Mage Wars equation
Post by: ringkichard on April 25, 2014, 09:21:26 PM
Was I wrong to think this was a literary exercise rather than a mathematical one?
Title: Re: I've discovered the Mage Wars equation
Post by: Sailor Vulcan on April 25, 2014, 09:26:58 PM
First of all, did you even attempt to read the equation and understand what it says?

Yes.

Quote
Or did you just see a bunch of mathematical and logical symbols and think "gibberish".

I spent some time trying to figure out just what the hell you were trying to say with your equation. It honestly just looks like a bunch of random mathematical symbols thrown together. Hence, gibberish.

Quote
I spent HOURS working on this equation.

Time spent isn't the only requirement to have something that makes sense.

Quote
No one has bothered actually commenting on the actual content of the equation. Everyone's just glanced at it and said "GIBBERISH!" without even READING THE EQUATION.

I know you're upset about this, but your equation simply does not make sense. I don't even know what you're trying to do with it.

Quote
Otherwise I would be reading critiques on the actual mathematical logic that I used.

There are more options than what you've presented.

Quote
Not a single person has actually pointed out any particular flaws in the equation, only the fact that it's an equation.

That's because no one knows what your equation is supposed to do. You even said you didn't know. How can you expect us to?

Quote
Keep in mind I worked very hard on this. And I DID explain how I came up with this equation, but in case it's not clear, I will repeat myself in greater detail.

None of what you wrote qualifies as an explanation. It would be sufficient for an initial idea into this sort of thing, but not for the finished product. You're claiming to know the "Mage Wars equation", but can't think of any applications for it and haven't tested it at all.

Quote
However, I did not know the mathematical symbol for and/or, to indicate the choice between resources for each conversion. I vaguely remembered an algebra class where we learned that all possible solutions for the unknown variable in an equation could be written in a list like this:

x={x1, x2, x3,...}

As best I can tell, you're referring to a set, though sets don't appear in equations like you have. This makes it ambiguous if you're referring to a vector instead (which would be from Linear Algebra).

Quote
Therefore, I thought a list separated by commas was the equivalent of saying "and/or" between every value on the list. I'm starting to see that a lot of people don't know that notation, or that notation is wrong. That's what I used at first before I started to realize that:

{-m, -a, -p, -t, -d, -l}+{m, a, p, t, d, l}

See, here is part of the reason why it's confusing. It you're referring to sets, then the proper notation would be:

{-m, -a, -p, -t, -d, -l} U {m, a, p, t, d, l} = {+/- m, +/- a, +/- p, +/- t, +/- d, +/- l}

On the other hand, if you're referring to vectors you'd have:

Let A = {m, a, p, t, d, l}

{-m, -a, -p, -t, -d, -l} = -{m, a, p, t, d, l} = -A

-A  + A = 0 (0-vector, which is {0, 0, 0, 0, 0, o} in R 6).

Either way doesn't seem to be what you're intending.

Quote
After that I was struck by another epiphany. If I could multiply this expression for resource conversion in mage wars by the number of times it occurred in the game, I might be able to figure out an equation for all resource conversions in the game. I realized that nearly all if not all chains of resource conversions started with actions and activated abilities

[{-m, -a, -p, -t, -d, -l}+{m, a, p, t, d, l}]*[r*a]

where r=total # of rounds in the game.

So you wanted to multiply your set/vector/thing by the total number of rounds and the total number of activations in the game? Or is it in that round? Or what? You're unclear here.

Quote
Then I realized I had made a mistake. Not all resource conversions were voluntary by one player or the other, even though most chains of resource conversions started off that way. Some resource conversions triggered without anyone choosing to activate them.


[{-m, -a, -p, -t, -d, -l, -tr}+{m, a, p, t, d, l, tr}]*[r*(a+tr)

(tr=trigger)

Similarly, trigger is left ambiguous.

Quote
I then realized that there were some chains of resource conversions that started with a trigger rather than an activation. They were the free mana and actions triggered during the channeling and reset phases, whose values were equal to the channeling stat and the number of objects with the creature type.

r|total|*(m(cavg/r)+(areset)avg/r

Are you saying that areset = the sum of all channeling plus the number of creatures on the board? What makes you so sure of this? How do you know channeling and creatures even relate like this?

Quote
And now for the full equation (or at least the latest version):

gfinal=gi+r|total|*(m(cavg/r)+(areset)avg/r+∑[(-sn∨-cn∨-mn∨-on∨-an∨-trn∨-pn∨-tn∨-dn∨-ln∨0n∨-stpn∨-phn∨-stgn∨-rcurrentn)+(sn, cn, mn, on, an, trn, pn, tn, dn, ln, 0n, stpn, phn, stgn, rcurrentn)]*[r|total|*(a+tr)avg/r]

What the h*** is a summation doing in there? Over what are you summing???


*Sigh.*



You've got a ton of variables in there, yet you haven't explained how they should be represented at all. That's a big part of why this whole thing is just gibberish.

How does one give a value of "tempo", for example? Or how do you determine the value of "gamestate"? You mentioned walls play into this...do you just mean the number or their location? How do passage blocked and LoS blocked change this?

The only thing you've done is thrown a bunch of "variables" together without actually explaining how they relate. Just saying, "oh, all these resources should go here and then I'll multiply them by other stuff for reasons" doesn't give anyone any useful information. And you haven't even gotten to coefficients yet!



I don't mean any of this as an attack on you personally. I understand what it's like to put time into things and get nothing in return. However, I'm not going to lie to you and say it's great when it doesn't even make sense.

I wasn't expecting you to lie to me. However, before this last post you weren't just not lying. You hadn't been saying anything at all, nor had anyone else. Any explanation is better than merely saying "it's giberish," and nothing else.

Also, just because someone doesn't know the applications of information doesn't mean that the information doesn't exist. What I had originally said was that I didn't know the applications of the information. Although I admit that I thought I was done sooner than I actually was, and kept noticing flaws that I had to go back and correct.

Also, I think you're right that I haven't tested this enough. All I've done is look for examples of card interactions and other resource conversions and mechanics etc. that don't conform to the equation. I suppose I missed what I should do for the the main test. I should plug in the values for every resource change in a single game, and see how close the predicted final game state is to the actual final game state.

I was summing all of the resource changes over the course of the game (excluding mana gained from channeling and activations gained from reset phase). So for instance, I would add all of the changes in channeling together, all the changes in mana together, all the changes in activations together, etc.


You make a really good point about tempo. Now that I think of it, I'm not sure how to define it specifically. As far as I understand, it's the relationship between time (in steps/phases/stages/rounds) and the amount of advantage a player has over their opponent(s), which would probably be measured by how much damage friendly sources could deal to the enemy mage if you wanted them to, minus the amount of damage enemy sources could deal to your own mage if they wanted to. Although that seems like a rather loose definition of tempo, and it would be hard to say if the amount of damage your opponent is capable of dealing in this or the next round is a true indicator of advantage in all situations.

Position also has such a dilemma. Rather than measuring the position of an object by summing all the ranges to and from all sources that could affect it, it would just be easier to assign zone labels to every position value. Unfortunately, tempo doesn't have that option. I don't know what to do about tempo. Maybe it's best represented by a combination of resource conversions, and I should just leave it out?

I did explain triggers, though. In my OP.

Also, I accidentally got rid of a set of brackets around the mana gained from channeling and the activations gained from reset. They're back in place now.

Thank you for actually responding. I'm sorry if the formula isn't legible. I thought it was, but perhaps I'm using incorrect notation...
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: Zuberi on April 25, 2014, 10:28:06 PM
So...are you supposed to plug in the "values" for every spell in both players spellbooks at the beginning of the game and end up with a prediction of the games resolution? I seriously doubt this equation can do that, despite my "Kick the Can" joke earlier (which is also kind of impossible).

Or, perhaps you're supposed to plug in variables as you play? In which case this is more of a recording of game play than anything else. I think there are easier ways to record a game than using this formula, however.

I apologize for making jokes about this project earlier. I seriously thought this was a joke. I still have trouble taking it seriously because I simply can't wrap my mind around it. You have not made it clear what this formula is doing at all. Remember, I'm an uneducated hillbilly from West Virginia. Try explaining it like you would to a 6 year old, step by step and with examples, and I may gain more appreciation for what's going on.
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: Zuberi on April 25, 2014, 10:33:54 PM
Looking back over things, you mentioned before that this equation predicts the paths that the game could take. Is this supposed to predict the number of variations a game could take given two spellbooks? Like, if I have 60 spells in my book and I cast 1 each round, there would be 60 possible states the game could be in on round 2, leaving me with 59 spells. Then there are 3,540 states it could be in on round 3. Add in all of the other actions you could take during a round and the fact that some of those actions give you additional actions.....and you end up with an exceptionally high number of possible outcomes after 10 rounds. And I'm not sure why this information would even be useful.
Title: I've discovered the Mage Wars equation (I think)
Post by: Sailor Vulcan on April 26, 2014, 09:02:16 AM
Looking back over things, you mentioned before that this equation predicts the paths that the game could take. Is this supposed to predict the number of variations a game could take given two spellbooks? Like, if I have 60 spells in my book and I cast 1 each round, there would be 60 possible states the game could be in on round 2, leaving me with 59 spells. Then there are 3,540 states it could be in on round 3. Add in all of the other actions you could take during a round and the fact that some of those actions give you additional actions.....and you end up with an exceptionally high number of possible outcomes after 10 rounds. And I'm not sure why this information would even be useful.

1. You're valuing all the cards as equal. This formula treats removing a card from your spellbook during a game as removing spellbook points. Also, you're forgetting your opponents resources and the neutral resources.
2. The formula is meant to predict the game state itself, not the number of game states.

I've corrected the definition of r|total| so that it's how many rounds that have been added in the game so far, rather than just by the end.
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: Zuberi on April 26, 2014, 01:24:59 PM
Quote from: Imaginator
1. You're valuing all the cards as equal. This formula treats removing a card from your spellbook during a game as removing spellbook points. Also, you're forgetting your opponents resources and the neutral resources.

I was trying to simplify things for an example. I understand that your equation is much more complicated.

Quote from: Imaginator
2. The formula is meant to predict the game state itself, not the number of game states.

So you are saying that if we both plug in our starting mages before playing the game, it will predict the outcome of the game? Thus, no need to play, lol. This is exactly what I joked about earlier and you told me I was mistaken, plus I seriously doubt it can do this.
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: Sailor Vulcan on April 26, 2014, 01:54:57 PM
Actually, it does not remove the need to play. This equation doesn't predict human psychology and it's not meant to. Rather, the choices determined by human psychology are already given by the players and plugged into the equation. Every single resource conversion needs to be plugged in to determine a prediction of the outcome of the game. It's faster to actually play. However, the equation is supposed predict up to a particular round, it doesn't need to be the final round. And it doesn't predict who will win, only what the ENTIRE gamestate will be after plugging in all of the resource conversions, minus who controls what resources. What an equation like this is useful for would not be to determine outcomes of games for us. It would be useful for making an AI mage wars opponent (or at least I hope).
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: Zuberi on April 26, 2014, 02:58:19 PM
So, you tell it everything you've done up to this point, and it tells you where things currently sit....

That's not predicting anything. That's simply recording the game. And there are easier and more sensible ways to do that.
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: fas723 on April 29, 2014, 08:21:37 AM
Imaginator,
I've also been trying to read / understan your equation. It not very easy to follow everything (if you have spent hours it is not strange it is hard for us to follow based on just a forum post).

You probably have some good thouts behind all this, which I really would like to understand.

Am I following you that for Mana, life, damage etc you just type in whatever you have? For all creatures? For each given round?
The parameter Object, tempo etc is harder to follow... Do you use 1,2,3 at object based on the number of enchantments / equipment you have? Tempo is +1 each time your opponent pass one of his action?
At the end you summuraz everything (before gi+r|total|*(m(cavg/r)+(areset)avg/r)

∑[(-sn∨-cn∨-mn∨-on∨-an∨-trn∨-pn∨-tn∨-dn∨-ln∨0n∨-stpn∨-phn∨-stgn∨-rcurrentn)+(sn, cn, mn, on, an, trn, pn, tn, dn, ln, 0n, stpn, phn, stgn, rcurrentn)]*[r|total|*(a+tr)avg/r]

I struggel a bit with your parameters having different units. Is it correct to add all the differnet things together. At a first view it looks like you are adding car with bananas, blue and happy. Maybe I'm not reading it right...
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: lettucemode on April 29, 2014, 09:10:57 AM
It's not really an equation for predicting a game state, it's the equation for what the game state will be after some stuff has happened. The first part of it is "gameStateFinal = gameStateInitial + ...."

It would be useful for making an AI mage wars opponent (or at least I hope).

I have done a good chunk of AI work in the past. For something like a board or card game, the overall best way to make an AI is called a state space search. In essence, the game has an initial state, a "goal" state which the AI is trying to reach, operations that move the game from one state to the next, and a heuristic (or formula) that determines how favorable a particular state is. An example of this is Chess AIs, which have been better than humans for at least a decade because they literally check every single game state for at least 20 moves out and figure out which path is the best. This is also the reason why Go AIs are generally bad - the state space is so gigantically enormous that it simply can't be searched in the time the human player is willing to wait.

From that perspective, I think your equation makes sense if the things you are adding together are not strictly numbers, but more like actions or pieces of a game state. I think some of the confusion in this thread is because it's very normal to see the word "equation" and think of a numerical formula. But you have made something more like a model.

It is easy to model a Mage Wars game state with modern programming tools already. However, something that would be insanely, incredibly, amazingly useful for an AI would be the heuristic I mentioned. That is, a formula where the input is the game state and the output is a number that represents how favorable that particular game state is for one player. An extremely naive example would be something like: favorability = number of my creatures - number of opponent's creatures. But a really good one would take into account creatures, whether it's early, mid, or late game, current life, mana, and channeling, and a host of other things. If you could tweak your model into something like that, I think it would generate a great deal of positive discussion and could produce something very cool and useful.
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: Zuberi on April 30, 2014, 04:31:23 AM
The post by lettucemode really helped me to understand what was going on. That makes a lot of sense.
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: ringkichard on April 30, 2014, 06:21:44 AM
I also really like LM's post about AI modeling.
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: Hedge on May 02, 2014, 03:27:17 PM
Great news guys, it seems we have found our solution to the tie break problem.





Hedge
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: Sailor Vulcan on May 02, 2014, 05:31:26 PM

Great news guys, it seems we have found our solution to the tie break problem.





Hedge

Do you mean by seeing which player has a larger portion of victorious final game states that are possible? Or are you being sarcastic?
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: Hedge on May 03, 2014, 03:17:30 PM

Great news guys, it seems we have found our solution to the tie break problem.





Hedge

Do you mean by seeing which player has a larger portion of victorious final game states that are possible? Or are you being sarcastic?

I'm Being Sarcastic as it would take too long to input the data as you have already mentioned. I thought it was quite funny. I understand the point of the equation and how one would use it once the end values have meaning.





Hedge
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: lettucemode on May 03, 2014, 05:05:36 PM
Quote
I thought it was quite funny.

As did I!

Do you mean by seeing which player has a larger portion of victorious final game states that are possible?

That number is infinity, for both players, always.
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: Sailor Vulcan on May 03, 2014, 05:27:32 PM
Maybe so, but some infinities are bigger than others.

http://www.youtube.com/watch?v=elvOZm0d4H0
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: Layana on June 11, 2014, 02:36:00 AM
@Imaginator: That is indeed true, but in our case, as we are dealing with cardinals, IF they are infinite, they are countably infinite (and thus bijective/equal in size)

@lettucemode: That number is not ALWAYS infinite, for both players. suppose a situation where neither player has any cards left in his spellbook and no way to heal or generate life. imagine there is a ghoul rot on one of the players - that game will end in a finite number of turns bounded by (HP of Mage left)/2+1,  and in each turn, there are only finitely many options, therefore you are indeed looking at a situation where there are only finitely many possible outcomes. In fact, i have heard (from AI research guys) that playing a few random games from a position can be somewhat viable as a measure for how good the position is, even in go (this amounts basically to a Monte Carlo simulation of the game space).
Title: Re: I've discovered the Mage Wars equation (I think)
Post by: lettucemode on June 12, 2014, 08:50:06 AM
@lettucemode: That number is not ALWAYS infinite, for both players. suppose a situation where neither player has any cards left in his spellbook and no way to heal or generate life. imagine there is a ghoul rot on one of the players - that game will end in a finite number of turns bounded by (HP of Mage left)/2+1,  and in each turn, there are only finitely many options, therefore you are indeed looking at a situation where there are only finitely many possible outcomes. In fact, i have heard (from AI research guys) that playing a few random games from a position can be somewhat viable as a measure for how good the position is, even in go (this amounts basically to a Monte Carlo simulation of the game space).

That is true, I did not consider a situation like the one you describe. I was more thinking that if both players are out of cards and the only thing they have left is a melee attack, there is an infinite number of ways for the game to end. Or rather, there is a finite number of game end states, but the number of paths to those states is infinite, because the mages could just walk in circles for 5 or 500 rounds before attacking the other (though any decent AI would prune those branches). But you raise a good point.

Anyway. AIs are hard guiz, doubly so for a game like Mage Wars.