Fire Emblem Probability
Reply | Flag | Categorize
Timothy Foster 06 Feb 2013 14:17
Timothy Foster

Admin

WAC

Guest

In Fire Emblem, when you attempt to attack an enemy, a list of percentages are given indicating things such as hit chance. If the statistics say that you have a 50% chance of hitting, though, you actually have a 49.5% chance of hitting. Why is that?

Normally, you would think that the game would roll a d100 die, and any roll that is less than or equal to the displayed percentage would be a hit; any roll above would be a miss. Fire Emblem games beyond FE5, however, utilize a different system which gives the player a statistical advantage. When a player rolls, two d100 dice are rolled, and the average of the rolls is compared to the percentage instead. Oddly enough, this actually affects the real probability significantly. When FE says you have an 85% chance of a hit, you actually have a 95.4% chance of a hit, which is significantly greater, and therefore you have an advantage, making the game easier and more playable.

Here's the challenge: what is the real theoretical probability $p_r$ of a hit given the displayed hit percentage, $p$? Specify if you take $p$ on the interval [0, 1] or [0, 100].

Attachment:

AnonymousBoba Foxx 06 Feb 2013 14:45
Anonymous

Included page "member:anonymous" does not exist (create it now)

Boba Foxx
Guest

To make sure I don't go do the wrong thing, I'd like to make sure I understand correctly first.
Basically, we're to find the probability that we get a hit (which is defined as the the average of two d100 must be less than P) when we're given a chance P of hitting?

Attachment:

Timothy Foster 06 Feb 2013 16:09
Timothy Foster

Admin

WAC

Guest

Yes. If Fire Emblem says that the chance of hitting, $p$, is 70%, what is the real chance of hitting? That's determined by rolling two one-hundred sided dice, taking their average, and checking if that average value is less than or equal to $p$.

Attachment:

AnonymousBoba Foxx 06 Feb 2013 16:21
Anonymous

Included page "member:anonymous" does not exist (create it now)

Boba Foxx
Guest

Hmm.. I'm tempted to just brute-force it since I'm too lazy to write an actual algortih…
I'll see what I can do during precal.

Attachment:

AnonymousBoba Foxx 06 Feb 2013 17:27
Anonymous

Included page "member:anonymous" does not exist (create it now)

Boba Foxx
Guest
:Input "Prob? (0-100) ",X
:Clrhome:Output(1,1,"Working
:For(θ,1,100
:solve((X-(θ-A)/2),A,{-200,200}
:Ans→A
:If abs(A>100
:100(A>0)→A
:A→L₁(θ
:Output(2,1,θ
:End
:100→dim(L₁
:sum(L₁
:Clrhome:Output(1,1,Ans
:Output(2,1,"/10000

Attachment:

Timothy Foster 06 Feb 2013 21:59
Timothy Foster

Admin

WAC

Guest

Could the solve() line be simplified to θ-2X→A (which actually needs to be negated for the algorithm to actually work)?

I don't have a calculator that operates TI-Basic anymore, so I transcribed it to C++. It seems to work for numbers greater than 50, but for numbers less than 50, it estimates low (ie. 0 outputs -50.5). I assumed that abs(A>100 was actually 100<abs(a.

I can get it to work by changing:

:If abs(A>100
:100(A>0)→A


to

:If A>E2
:E2→A
:If A<0
:DelVar A

Attachment:

AnonymousBoba Foxx 06 Feb 2013 23:44
Anonymous

Included page "member:anonymous" does not exist (create it now)

Boba Foxx
Guest

Yeah, I never tested anything below 25 (which is where the abs(A breaks for me); your code works perfectly (It should have been ":If abs(A>100)) or (A<0")
If I change the solve( line, then I get way different answers than what I should (like 0 when I input 85, whereas before I got 95.35).

Attachment:

Timothy Foster 06 Feb 2013 23:52
Timothy Foster

Admin

WAC

Guest

Right, which is why I said it needs to be negated; try 2X-θ→A instead of the solve line.

Besides that, good work (:

Here's what I came up with, where Ans is the displayed percentage:

:2Ans-50.5+.01(101-2Ans)abs(Ans-50

Attachment:

simonalford42 07 Feb 2013 00:13
simonalford42

Included page "member:simonalford42" does not exist (create it now)


Guest

darn… I don't know how to go about doing this problem. They never teach us any probability at my school >:( I don't think I'd be able to do it anyway, though.

Attachment:

AnonymousBoba Foxx 07 Feb 2013 01:13
Anonymous

Included page "member:anonymous" does not exist (create it now)

Boba Foxx
Guest

Oh, that's what had me confused. Before, you said

θ-2x→A

but you meant

2X-θ→A

Which is basically the solve() line simplified.

I probably would've done that if I'd optimized it much; I'd just woken up from a move in history and was still kinda sleepy, but I was more concerned with getting it to work, rather than getting it to work quickly.

Attachment:

Make a reply:

To use the style buttons, click on the one you want, then press Ctrl+V.


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.