Koga is the Fuchsia City Gym Leader, the fifth of the eight Gym Leaders in Pokemon Red, Blue and Yellow, fought in Fuchsia Gym. In Red and Blue he uses Koffing (Lv 37), Muk (Lv 39), Koffing (Lv 37) and Weezing (Lv 43); in Yellow, Venonat (Lv 44), Venonat (Lv 46), Venonat (Lv 48) and Venomoth (Lv 50). Beating him earns the Soul Badge, TM06 (Toxic) and 4,257 in prize money (4,950 in Yellow).
Koga's AI, in short: in Red and Blue he uses an X Attack on 25% of turns (at most 2 per Pokemon); in Yellow he uses an X Attack on 12.5% of turns (at most 2 per Pokemon). He picks moves by Rules 1 and 3 in all three games. Everything on this page is read from the game's code, and GardenFlouer's battler runs the same routines, tested in the game's own code in an emulator.
Where
Fuchsia Gym
Team
4 Pokemon, Lv 37 to 43 in Red and Blue; 4 Pokemon, Lv 44 to 50 in Yellow
Reward
Soul Badge, TM06 Toxic, prize 4,257 in Red and Blue, 4,950 in Yellow
Badge effect
In battle (not link battles) your Pokemon's Speed goes up by an eighth; Surf works outside battle
Items
Uses an X Attack on 25% of turns (at most 2 per Pokemon) in Red and Blue; in Yellow uses an X Attack on 12.5% of turns (at most 2 per Pokemon)
Move choice
Rules 1 and 3 in all three games (explained below)
Moves in red are set by the game's own code on top of the normal moveset (a gym leader's move in their own gym, the Elite Four's team move, the Champion's moves, or Yellow's special trainer moves). Stats use the trainer DVs every Gen 1 trainer gets (9, 8, 8, 8) and no stat experience.
On 25% of his turns (64 in 256), he uses an X Attack instead of attacking (it raises its Attack one stage).
At most 2 items per Pokemon. The count starts over every time one of his Pokemon comes out.
The game rolls when his Pokemon's turn comes in the Speed order, after both of you picked a move. When he uses an item, his Pokemon does not attack that turn. Once that Pokemon's items are used up, the game does not roll for it at all.
How he picks a move
Every move starts at 10 points. The rules below add or take away points, and only the moves with the lowest score can be picked. Then the game rolls for a move slot until it lands on one of them: slot 1 takes 63 rolls of 256, slot 2 takes 64, slot 3 takes 63 and slot 4 takes 66, so among tied moves the fourth is a little more likely (25.8%, against 24.6%, 25% and 24.6% when all four tie).
Rule 1, no double status. If your Pokemon already has a status condition, each move that only puts you to sleep, poisons or paralyzes gets +5, so he will not pick it while another move scores lower. On his team that means Poison Gas and Toxic.
Rule 3, type matchups. A move whose type is super effective against your Pokemon gets -1, even one that does no damage. A move whose type is not very effective or has no effect gets +1, but only if the same Pokemon also has a damaging move of another type (or Super Fang, a fixed damage move such as Seismic Toss, or Fly). The check reads only the first line of the type chart that matches either of your types, so against a two-type Pokemon it can see one type and miss the other.
Against Caterpie (Bug type), Muk's Poison Gas gets the -1 push even though it does no damage, because the check looks only at the move's type (Poison).
Against Ekans (Poison type), Weezing's Toxic gets +1 and is held back: its Poison type is not very effective against Poison, and his Pokemon has a better move to use.
Against Bulbasaur (Grass and Poison), Koffing's Smog is read as super effective, so it gets -1, but it really does 1x damage: the check stopped at the first line of the type chart that matched one of the two types.
The computer's stat-lowering moves can fail on their own. When the computer uses a move that lowers your stats, the game first rolls 0 to 255 and the effect fails on anything under 64: a 1 in 4 chance, before accuracy is even checked. Your own moves never get this roll, and link battles do not have it. On his team: SmokeScreen.
Yellow
Items
On 12.5% of his turns (32 in 256), he uses an X Attack instead of attacking (it raises its Attack one stage).
At most 2 items per Pokemon. The count starts over every time one of his Pokemon comes out.
The game rolls when his Pokemon's turn comes in the Speed order, after both of you picked a move. When he uses an item, his Pokemon does not attack that turn. Once that Pokemon's items are used up, the game does not roll for it at all.
How he picks a move
Every move starts at 10 points. The rules below add or take away points, and only the moves with the lowest score can be picked. Then the game rolls for a move slot until it lands on one of them: slot 1 takes 63 rolls of 256, slot 2 takes 64, slot 3 takes 63 and slot 4 takes 66, so among tied moves the fourth is a little more likely (25.8%, against 24.6%, 25% and 24.6% when all four tie).
Rule 1, no double status. If your Pokemon already has a status condition, each move that only puts you to sleep, poisons or paralyzes gets +5, so he will not pick it while another move scores lower. On his team that means Toxic and Sleep Powder.
Rule 3, type matchups. A move whose type is super effective against your Pokemon gets -1, even one that does no damage. A move whose type is not very effective or has no effect gets +1, but only if the same Pokemon also has a damaging move of another type (or Super Fang, a fixed damage move such as Seismic Toss, or Fly). The check reads only the first line of the type chart that matches either of your types, so against a two-type Pokemon it can see one type and miss the other.
Against Caterpie (Bug type), Venonat's Toxic gets the -1 push even though it does no damage, because the check looks only at the move's type (Poison).
Against Charmander (Fire type), Venonat's Sleep Powder gets +1 and is held back: its Grass type is not very effective against Fire, and his Pokemon has a better move to use.
Against Zubat (Poison and Flying), Venomoth's Leech Life is read as not very effective, so it gets +1, but it really does 1x damage: the check stopped at the first line of the type chart that matched one of the two types.
The computer's stat-lowering moves can fail on their own. When the computer uses a move that lowers your stats, the game first rolls 0 to 255 and the effect fails on anything under 64: a 1 in 4 chance, before accuracy is even checked. Your own moves never get this roll, and link battles do not have it. For a side effect (Psychic), that roll comes before the usual 85 in 256, so when the move hits the stat drop happens 24.9% of the time instead of 33.2%.
Your Pokemon vs Koga: What Will the AI Pick?
Pick your Pokemon and see, for each of his Pokemon, what its moves do to yours, how the AI scores each one, and the exact chance it picks each move this turn. Rows in color are the moves that can be picked. It runs the game's own rules, checked against the battler's engine.
Your Pikachu (Electric) against Koga's team in Red and Blue: no status on your Pokemon, its Pokemon's first turn.
KoffingLv 37Poison
Your types against it: Electric 1x.
Its move
On you
AI score
Chance
Tackle Normal
1x
10
24.6%
Smog Poison
1x
10
25%
Sludge Poison
1x
10
24.6%
SmokeScreen Normal
Status
10
25.8%
MukLv 39Poison
Your types against it: Electric 1x.
Its move
On you
AI score
Chance
Disable Normal
Status
10
24.6%
Poison Gas Poison
Status
10
25%
Minimize Normal
Status
10
24.6%
Sludge Poison
1x
10
25.8%
KoffingLv 37Poison
Your types against it: Electric 1x.
Its move
On you
AI score
Chance
Tackle Normal
1x
10
24.6%
Smog Poison
1x
10
25%
Sludge Poison
1x
10
24.6%
SmokeScreen Normal
Status
10
25.8%
WeezingLv 43Poison
Your types against it: Electric 1x.
Its move
On you
AI score
Chance
Smog Poison
1x
10
24.6%
Sludge Poison
1x
10
25%
Toxic Poison
Status
10
24.6%
Selfdestruct Normal
1x
10
25.8%
Your Pikachu (Electric) against Koga's team in Yellow: no status on your Pokemon, its Pokemon's first turn.
VenonatLv 44Bug / Poison
Your types against it: Electric 1x.
Its move
On you
AI score
Chance
Toxic Poison
Status
10
24.6%
Tackle Normal
1x
10
25%
Sleep Powder Grass
Status
10
24.6%
Psychic Psychic
1x
10
25.8%
VenonatLv 46Bug / Poison
Your types against it: Electric 1x.
Its move
On you
AI score
Chance
Toxic Poison
Status
10
24.6%
Psybeam Psychic
1x
10
25%
Supersonic Normal
Status
10
24.6%
Psychic Psychic
1x
10
25.8%
VenonatLv 48Bug / Poison
Your types against it: Electric 1x.
Its move
On you
AI score
Chance
Toxic Poison
Status
10
24.6%
Double-Edge Normal
1x
10
25%
Sleep Powder Grass
Status
10
24.6%
Psychic Psychic
1x
10
25.8%
VenomothLv 50Bug / Poison
Your types against it: Electric 1x.
Its move
On you
AI score
Chance
Leech Life Bug
1x
10
24.6%
Double Team Normal
Status
10
25%
Psychic Psychic
1x
10
24.6%
Toxic Poison
Status
10
25.8%
Fight Koga in the Battler
Each Fight this team button above opens GardenFlouer's Gen 1 battler with that exact team: the real levels and moves, and the class AI with its items and switching, run by the same rules as the cartridge. Pick your team or tap Random 6, then Battle. Your team fights at level 100 unless you tick Use a matching level there.
The Soul Badge, TM06 (Toxic) and 4,257 in prize money in Red and Blue (4,950 in Yellow). The badge: in battle (not link battles) your Pokemon's Speed goes up by an eighth; Surf works outside battle.
Does Koga use items?
He uses an X Attack on 25% of turns (at most 2 per Pokemon) in Red and Blue; in Yellow he uses an X Attack on 12.5% of turns (at most 2 per Pokemon).
How does Koga's AI pick moves?
Every move starts at 10 points, the class's rules add or take away points, and only the lowest scores can be picked; then a slot roll breaks the tie, a little in favour of slot 4 (66 in 256). Koga uses Rules 1 and 3 in Red and Blue and Rules 1 and 3 in Yellow. The odds calculator on this page shows the exact chance of each move against your Pokemon.
Can I battle Koga online?
Yes, in GardenFlouer's Gen 1 battler, free in your browser. The Fight buttons on this page load his exact team, with the class's AI, items and switching, run by the same rules as the cartridge.
Where This Comes From
Every team, level, move and prize here is read from the pret disassemblies of Pokemon Red, Blue and Yellow, the community projects that turned the cartridges back into readable code, through the same trainer data as the trainer database. The AI is the game's own trainer AI routine for his class. The odds calculator runs the game's move choice rules, and a test replays every one of its answers in the battler's engine, which matched the real game in an emulator in all 352 Red and 343 Yellow trainer fights it was run on.