# HG changeset patch # User Robert McIntyre # Date 1320244557 25200 # Node ID fd38763de457bd770a780823e7d79cc42bd1f84a # Parent 4f9ef752e2f0d37d648ae0f61ad1c3ad95c296f8 added links for the pokemon diff -r 4f9ef752e2f0 -r fd38763de457 org/types.org --- a/org/types.org Wed Nov 02 07:01:49 2011 -0700 +++ b/org/types.org Wed Nov 02 07:35:57 2011 -0700 @@ -8,16 +8,15 @@ * The Pok\eacute{}mon Type System The Pok\eacute{}mon type system consists of seventeen different -\ldquo{}types\rdquo{} (Rock, Grass, Ice, Psychic, Ground, Bug, Flying, -Fire, Fighting, Dark, Dragon, Poison, Water, Ghost, Normal, Electric, -and Steel) that interact like an extended version of -Rock-Paper-Scissors: for example, the Fire type is strong against the -Grass type but weak against the Water type. In the table below, we've -recorded the relative strengths of each of the types in the -Pok\eacute{}mon type system; the number in each cell indicates how -effective an attack of the type in the row is against a -Pok\eacute{}mon of the type in the column. We call these numbers -/susceptibilities/. +/types/ (Rock, Grass, Ice, Psychic, Ground, Bug, Flying, Fire, +Fighting, Dark, Dragon, Poison, Water, Ghost, Normal, Electric, and +Steel) that interact like an extended version of Rock-Paper-Scissors: +for example, the Fire type is strong against the Grass type but weak +against the Water type. In the table below, we've recorded the +relative strengths of each of the types in the Pok\eacute{}mon type +system; the number in each cell indicates how effective an attack of +the type in the row is against a Pok\eacute{}mon of the type in the +column. We call these numbers /susceptibilities/. In the Pok\eacute{}mon games, only four susceptibility values (two, one, one-half, and zero) occur. These numbers indicate particularly @@ -48,7 +47,7 @@ introduction of pok\eacute{}mon Gold and Silver, and has been in use ever since. It is called the /Generation II Type System/. -Here are the the definitions of the two type systems. +The definitions of the two Type Systems are included below. * Generation I and II Type System Data @@ -112,10 +111,13 @@ Generation II). - Ice is normally effective against Fire, (not-very-effective in Generation II). - - Ghost is completely ineffective against Psychic. This is considered - to be a programning glitch. - - + - Ghost is completely ineffective against Psychic, even though the + pok\eacute{}mon anime ran [[http://bulbapedia.bulbagarden.net/wiki/EP022][a three-part series]] about how Ghost + pok\eacute{}mon are the best way to defeat Psychic pok\eacute{}mon, + and the Red, Blue, and Yellow games each have a character who + states "The only thing Psychic pok\eacute{}mon fear are Bugs and + Ghosts!" This is considered to be a programning glitch. Ghost is + super-effective against Psychic in Generation II. * Representing the Data @@ -233,13 +235,13 @@ * Interfacing with the Data In the pok\eacute{}mon games, a pok\eacute{}mon can have up to two -types at the same time. For example, Zapdos, the fearsome legendary -that can control lightning, has both the Electric and Flying types. A -pok\eacute{}mon with more than one type gains the advantages and -disadvanteags of both types. The suceptibilitys of each type are +types at the same time. For example, [[http://bulbapedia.bulbagarden.net/wiki/Zapdos][Zapdos]], the fearsome legendary +bird that can control lightning, has both the Electric and Flying +types. A pok\eacute{}mon with more than one type gains the advantages +and disadvanteags of both types. The suceptibilitys of each type are multiplied together to produce the hybrid type's susceptibilities. For example, Electric is weak to Ground (susceptibility of 2), but Flying -is immune to Ground (suceptibility of 0). Zapdos' type, +is immune to Ground (suceptibility of 0). [[http://bulbapedia.bulbagarden.net/wiki/Zapdos][Zapdos']] type, Electrig/Flying, is immune to Ground because $2 \times 0 = 0$. #+srcname: types @@ -270,7 +272,7 @@ (reduce + (map #(expt % 2) (vals (susceptibility types))))) #+end_src -Now we can work out the suceptability of Zapdos automatically. +Now we can work out the suceptability of [[http://bulbapedia.bulbagarden.net/wiki/Zapdos][Zapdos]] automatically. Electric is weak to Ground. #+begin_src clojure :exports both @@ -440,14 +442,15 @@ : [:dark :ghost] Dark and Ghost, which additionally has the property of having no - weaknesses to any other type, is the best type combo in terms of - susceptance. +weaknesses to any other type, is the best type combo in terms of +susceptance. The Dark and Steel types were introduced many years after pok\eacute{}mon started. In addition to the additional types, the pok\eacute{}mon games gained a few new rules concerning some of the -matchups of the original types. Therefore, it's also interesting to see what -type combination was most powerful before those types and new rules were introduced. +matchups of the original types. Therefore, it's also interesting to +see what type combination was most powerful before those types and new +rules were introduced. The easiest way to do this with my setup is to just rebind the =pokemon-gen-two= table to the =pokemon-gen-one= table. Since @@ -584,9 +587,10 @@ Electric and Normal are among the best types with which to start the game, since they have the fewest weaknesses among all the types. -At the beginning of the pok\eacute{}mon games, players are given a choice -between the Fire pok\eacute{}mon Charmander, the Water pok\eacute{}mon Squirtle, or -the Grass/Poison pok\eacute{}mon Bulbasaur. +At the beginning of the pok\eacute{}mon games, players are given a +choice between the Fire pok\eacute{}mon [[http://bulbapedia.bulbagarden.net/wiki/Charmander][Charmander]], the Water +pok\eacute{}mon [[http://bulbapedia.bulbagarden.net/wiki/Squirtle][Squirtle]], or the Grass/Poison pok\eacute{}mon +[[http://bulbapedia.bulbagarden.net/wiki/Bulbasaur][Bulbasaur]]. #+begin_src clojure :exports both :results verbatim (sort-by pokemon.types/susceptance [[:fire] [:water] [:grass :poison]]) @@ -595,7 +599,7 @@ #+results: : ([:water] [:fire] [:grass :poison]) -As can be seen, the Water pok\eacute{}mon Squirtle is the most solid +As can be seen, the Water pok\eacute{}mon [[http://bulbapedia.bulbagarden.net/wiki/Squirtle][Squirtle]] is the most solid choice starting out, insofar as susceptance is concerned. ** The Worst Pok\eacute{}mon Types @@ -703,8 +707,6 @@ In the [[./lpsolve.org][next installment]], I'll use =lp_solve= to solve this problem in a different way. - - * COMMENT main program #+begin_src clojure :noweb yes :tangle ../src/pokemon/types.clj :exports none <
>