- 1
- Posts
- 4
- Years
- Seen Feb 27, 2020
One day, one trainer find a ball-shape unknown-type unknown-ability Pokemon, so we want to know what's the type of this new friend.
As far as we know, this new friend belongs to one or two of eighteen types, and one ability. Because it's hard to identify whether its move is STAB, so we decide to softly attack it to identify the type(s) of it. By each attack, we can get one of the following result: Super effective(SE), normal(NM), less effective(LE) and immune(IM). We aims to know the type(s) of new friend in finite steps. Ability will influence the results, like levitate will immune to ground attack.
Assume the possibility of each type(s) is:
One type: 1/18 * 1/2 = 1/36
Dual types: 1/18 * 1/18 = 1/324
Not existing dual types may appear.
Question 1:
What's the fastest algorithm to get the answer?
Possible answer 1:
1. Input with the whole possible type(s) pool
2. Iterate until only 1 left in the pool
3. For each iteration, calculate the number of for results(SE, NM, LE, IM) among all combinations (type + ability)
4. Choose the most balanced attack to perform (Maximize the minimal number)
5. Stop when line 2 is true, or repeat to line 3.
Question 2:
What is the attack set for the lowest expectation of all possible one type/dual type and what's the expectation.
Currently no idea.
As far as we know, this new friend belongs to one or two of eighteen types, and one ability. Because it's hard to identify whether its move is STAB, so we decide to softly attack it to identify the type(s) of it. By each attack, we can get one of the following result: Super effective(SE), normal(NM), less effective(LE) and immune(IM). We aims to know the type(s) of new friend in finite steps. Ability will influence the results, like levitate will immune to ground attack.
Assume the possibility of each type(s) is:
One type: 1/18 * 1/2 = 1/36
Dual types: 1/18 * 1/18 = 1/324
Not existing dual types may appear.
Question 1:
What's the fastest algorithm to get the answer?
Possible answer 1:
1. Input with the whole possible type(s) pool
2. Iterate until only 1 left in the pool
3. For each iteration, calculate the number of for results(SE, NM, LE, IM) among all combinations (type + ability)
4. Choose the most balanced attack to perform (Maximize the minimal number)
5. Stop when line 2 is true, or repeat to line 3.
Question 2:
What is the attack set for the lowest expectation of all possible one type/dual type and what's the expectation.
Currently no idea.