Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Battle AI of the computer
#18
(2016-05-18, 08:37 PM)CeFurkan Wrote:
(2016-05-18, 02:30 PM)hotice Wrote: It's Awesome Smile , now our cpu elo teams will do better.

I have a question though:

While doing the calculations, does it account for the 'base power 1' moves. Like reversal, gyro-ball, night-shade, etc which depend on pokemons hp,level,speed and other stats.

no it doesnt calculate them

if you give me detailed strategy i may implement

OK. Here's what I think would be a good approach : 

Compare the speeds of the two pokemon. There can be three cases.
1.Both have equal speed: If it certain who moves first then that can be accounted to switch to case 2 or 3 otherwise choose randomly between cases 2 or 3.
2. If ai is faster than opponent then calculating the power is almost equivalent to calculating the damage.
e.g.  We know the current hp of ai so we can calculate the base power of reversal, flail, eruption, etc.
3. If ai is slower, we need a little of prediction.
 i.e. We calculate the maximum damage the opponent can deal to us in this move considering all their moves(without accounting the +/- 25% randomness or always accounting +25% for maximum). We reduce that damage from hp (For our calculations only). Then we know what will the hp of ai be after opponent moves and we can calculate the moves power.

e.g. AI is a heracross having maximum hp, which is say 300, facing some opponent which can deal at most 150 hp damage to it.
If heracross is faster than opponent, the base power of reversal would be 40*maximumhp/currenthp = 40.
If it is slower, then new hp = maximum(current hp - maximum damage,1) = 300-150 = 150
the base power of reversal = 40*maximumhp/newHp = 80.

Maximum damage can be calculated only if opponent is faster. Otherwise not necessary.
Messages In This Thread
Battle AI of the computer - by CeFurkan - 2016-05-18, 12:07 PM
RE: Battle AI of the computer - by Cpt. Obvious - 2016-05-18, 12:28 PM
RE: Battle AI of the computer - by hotice - 2016-05-18, 02:30 PM
RE: Battle AI of the computer - by CeFurkan - 2016-05-18, 08:37 PM
RE: Battle AI of the computer - by hotice - 2016-05-18, 09:40 PM
RE: Battle AI of the computer - by SomebodyUnown - 2016-05-18, 05:44 PM
RE: Battle AI of the computer - by SomebodyUnown - 2016-05-18, 06:01 PM
RE: Battle AI of the computer - by hotice - 2016-05-18, 06:48 PM
RE: Battle AI of the computer - by SomebodyUnown - 2016-05-18, 08:16 PM
RE: Battle AI of the computer - by hotice - 2016-05-18, 09:25 PM
RE: Battle AI of the computer - by CeFurkan - 2016-05-18, 09:10 PM
RE: Battle AI of the computer - by Daeva13 - 2016-05-18, 09:14 PM
RE: Battle AI of the computer - by CeFurkan - 2016-05-18, 09:22 PM
RE: Battle AI of the computer - by Daeva13 - 2016-05-18, 09:26 PM
RE: Battle AI of the computer - by SomebodyUnown - 2016-05-18, 09:31 PM
RE: Battle AI of the computer - by Daeva13 - 2016-05-18, 09:37 PM
RE: Battle AI of the computer - by hotice - 2016-05-19, 02:36 AM
RE: Battle AI of the computer - by CeFurkan - 2016-05-19, 11:56 PM
RE: Battle AI of the computer - by hotice - 2016-05-26, 08:41 AM
RE: Battle AI of the computer - by CeFurkan - 2016-06-03, 09:19 PM
RE: Battle AI of the computer - by hotice - 2016-06-08, 08:49 AM
RE: Battle AI of the computer - by CeFurkan - 2016-06-10, 01:07 AM
RE: Battle AI of the computer - by CeFurkan - 2016-06-10, 11:37 AM
RE: Battle AI of the computer - by LAURA WILSON - 2025-02-13, 06:37 AM
RE: Battle AI of the computer - by esha-kamran25 - 2025-03-15, 03:30 PM

Forum Jump:

Users browsing this thread: 2 Guest(s)

Users browsed this thread: alinajohnson998 , Birolo , blaze9000 , Derekbag , esha-kamran25 , Fefnir , Garryadand , Jameschoiz , Jerryzek , JohnKit , kane001 , KeithSwartz , LAURA WILSON , M.Blaze99 , Matthewkew , moontextile99 , mrsumitroy98 , NerryViown , pharoah , Riama , Rift , RobertKit , sarahpaul , Speak the truth , steaveshawn996 , t83uf8uf398t8u4rt , Thomasscume , TonaldVor , vewek , Willieabatt , xkreuz