The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Game Development Your number one stop for anything related to creating games (except ROM hacks). You can even make your own!


Advertise here

Reply
 
Thread Tools
  #1    
Old August 14th, 2013, 04:45 AM
daigonite's Avatar
daigonite
Ninjas Against Bottomless Pits
Community Supporter
 
Join Date: Feb 2009
Location: With the Birds
Age: 21
Nature: Impish

Advertise here
Hello folks! I'm currently working on designing the Enemy Trainer AI for Braillemon, which is a pokemon port that I'm working on. I wanted to see if people would review my basic AI setup and see if there's some changes I should make.

Some notes about Braillemon:
Braillemon uses mixed generation setups. It has Gen I Pokemon, Gen II moves, Gen III stats (with EVs and all that) and Gen IV's physical/special split.

Braillemon's AI is going to be sorted by tiers. Basically, the better the tier, the better the AI is. Here's the basic lineup I have now. I was wondering if you guys could throw over some suggestions and review it. Since I'm programming it from scratch, there's no need to comply to some information with Pokemon Essentials or whatever else is used these days. Just throw your suggestions out there and I'll see what I can do.

Code:
AI tiers:

All tiers can use items.

Tier 0:
Random moves only. Never switches.

Tier 1:
Random, but if a stalemate between two attacking moves, will choose the attacking move that is more powerful. Will not inflict status effects if already suffering from status effects. Never switches.

Will not use substitute or belly drum if HP is too low.

Tier 2:
If Pokemon has higher defenses than offenses, begins with first a status inflicting move, then a status lowering move. Once both have been implemented, will attack normally.

If Pokemon has higher offenses, will skip status lowering abilities unless enemy defenses/offenses are unusually high, using the status inflicting move to lower the stat. Will use a move that inflicts paralysis to lower speed, or a speed dropping move, but will not use status effecter if misses more than twice.

Both examples will use foresight or Odor sleuth if player has used Double Team or Minimize more than twice. If they lack this move, will use a 100% accuracy move instead.

Will use recovery moves if 33% or less.

Will not use substitute or belly drum if HP is too low.

Will only switch to counter Perish Song, and only on the last turn.

Tier 3:
If Pokemon has higher defenses than offenses, begins with first a status inflicting move, then a status lowering move. Once both have been implemented, will attack normally.

If Pokemon has higher offenses, will skip status lowering abilities unless enemy defenses/offenses are unusually high, using the status inflicting move to lower the stat. Will use a move that inflicts paralysis to lower speed, or a speed dropping move, but will not use status effecter if misses more than twice.

Both examples will use foresight or Odor sleuth if player has used Double Team or Minimize more than twice. If they lack this move, will use a 100% accuracy move instead.

Will use recovery moves if 50% or less.

Will switch if no moves are super effective and another character in the party has a super effective offensive move, or if the trainer has no moves that will hit the enemy Pokemon (for example, if a pokemon has all normal type moves, and sing, and is facing gastly, then will switch if gastly is under a status effect). Will also switch if affected by perish song. Will not use baton pass if affected by perish song.

Tier 4:
Highest tier.


Will have the following strategies implemented, checking for moveset.

Baton Pass + Status Booster
Will boost a stat up two stages then attempt to Baton Pass.

Baton Pass + Substitute
Will set up a substitute, then attempt to Baton Pass.

Mean Look/Spider Web + Perish Song
Will use the trapping move, then perish song away.

Super Fang + Quick Attack
Will use Super Fang to half HP, then use quick attack.

Spikes + Whirlwind/Roar
Will use spikes to set up, then whirlwind or roar to cause damage onto opponents. If a status effect move is in the moveslots, such as Toxic, will try to inflict a status effect before whirlwinding again (unless already has a status effect).

Endure + Reversal/Flail
Will use endure, then use reversal for a strong final attack.

Substitute + Leech Seed
Will use substitute, then Leech Seed.

Substitute + Pain Split
Will use Substitute, then pain split (if effective).

Reflect + Light Screen
Will use both moves first, then attack. Once one goes down, will put it back up.

Broad move combinations:

If has a paralysis and flinching move, will inflict paralysis, then try to flinch.

If has a paralysis and confusing move, will inflict paralysis, then try to confuse. After confusing, will attack.


Will focus on using attacks that are the same kind (physical or special as the attacking stat of the user. If Super Effective or STAB causes more damage, then will use that move.

If User uses an attacking move twice in a row, will use counter/mirror coat depending on that move.

Will use whirlwind/Roar if user is using stat booster to set up.

Will use Heal Bell if any Pokemon has a status effect, but will not use the move every turn.

Will use recovery move if HP is below 50%, but will not use a recovery move three times in a row.

FROM THERE

If Pokemon has higher defenses than offenses, begins with first a status inflicting move, then a status lowering move. Once both have been implemented, will attack normally.

If Pokemon has higher offenses, will skip status lowering abilities unless enemy defenses/offenses are unusually high, using the status inflicting move to lower the stat. Will use a move that inflicts paralysis to lower speed, or a speed dropping move, but will not use status effecter if misses more than twice.

Both examples will use foresight or Odor sleuth if player has used Double Team or Minimize more than twice. If they lack this move, will use a 100% accuracy move instead.

Will switch if no moves are super effective and another character in the party has a super effective offensive move, or if the trainer has no moves that will hit the enemy Pokemon (for example, if a pokemon has all normal type moves, and sing, and is facing gastly, then will switch if gastly is under a status effect). Will also switch if affected by perish song. Will not use baton pass if affected by perish song. Will switch out if trainer has a strong defensive pokemon with at least a 0.5x damage multiplier from the current move, if Pokemon is below 33% HP. Will switch out if an initially fast pokemon has paralysis, or an initially physically strong pokemon has a burn. Will automatically switch out if Pokemon is frozen. If Pokemon does not have Snore or Sleep Talk, will switch out if Asleep. Will switch out from Toxic Poison after three turns or if HP is below 33%.
__________________
Reply With Quote
  #2    
Old August 22nd, 2013, 03:03 AM
Anglican's Avatar
Anglican
Some Game Developer
 
Join Date: Jan 2011
Location: Atlantis
Gender: Male
Nature: Calm
I skimmed it a little, but it looks promising. One thing though - Improve tier 0 and 1. Random moves like that would only be good for, pretty much, the first route or two, in which case, abolish tier 0 and just have tier 1.
__________________
The Monoball Challenge - Have you got what it takes to catch 'em all, but with only one type of Pokéball? http://www.pokecommunity.com/showthread.php?p=7889482
Reply With Quote
  #3    
Old August 26th, 2013, 02:02 PM
Darkroman
 
Join Date: Oct 2011
Gender: Male
Nature: Adamant
You should specify which tiers will also take type advantages into account as well. Maybe on like Tier 2 it'd be a (just throwing numbers out there) 75% chance it'd use a super effective move against the opponent pokemon. In Tier 3 maybe the AI trainer will switch out a pokemon if it's weak against a certain pokemon type, and in Tier 4, that carries over with the addition of "remembering" if a pokemon used a certain pokemon that has an attack not matching its type.

e.g - AI trainer sends out Steelix, you send out Salamence. Salamence uses Earthquake. the AI now knows that your Salamence has a ground type move, so it won't send out a pokemon versus Salamence that's weak against ground types.
Reply With Quote
  #4    
Old August 26th, 2013, 02:26 PM
daigonite's Avatar
daigonite
Ninjas Against Bottomless Pits
Community Supporter
 
Join Date: Feb 2009
Location: With the Birds
Age: 21
Nature: Impish
Most trainers are tier 1 right now. Tier 1 performs a list of checks. Tier 0 is used mainly for wild pokemon, but can be used for the first few trainers you encounter.

Basically, it randomly chooses a move, then it checks if that move is a status inflicting move, a special effect move (such as protect for example), and checks if those moves will get a "had no effect" message. If they do, it chooses another move. If the randomly chosen move is an attacking move, it chooses the strongest alternative. For example, if an arbok knows earthquake and poison sting (lol), and the enemy is a grass type, it will still use Earthquake because it will do more damage regardless.

Otherwise there are no checks. Higher tiers will be used with gym leaders and elite 4 and special trainers. These will implement, in tier 2, certain strategic choices during certain circumstances. At tier 3 I'll start implementing user input response with minimax implementation.
__________________
Reply With Quote
  #5    
Old September 5th, 2013, 09:40 PM
audinowho's Avatar
audinowho
我是谁?
 
Join Date: Jul 2012
Gender: Male
BAttle subway trainers in all their haxiness actually run a damage calculation (in other words, a simulation with YOUR pokemon's stats known!) and will always go for the kill if they see that one will happen.

Actually, you could draw some ideas from here:

http://nuggetbridge.com/articles/a-o...battle-subway/
__________________


Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 11:40 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.