Skip to content

Instantly share code, notes, and snippets.

@648trindade
Last active July 4, 2016 18:37
Show Gist options
  • Save 648trindade/aad25fc8a61593cb59fa53306de9ad3e to your computer and use it in GitHub Desktop.
Save 648trindade/aad25fc8a61593cb59fa53306de9ad3e to your computer and use it in GitHub Desktop.
Base de conhecimento prolog sobre pokemons
grass(bulbasaur).
grass(ivysaur).
grass(venusaur).
grass(oddish).
grass(gloom).
grass(vileplume).
grass(paras).
grass(parasect).
grass(bellsprout).
grass(weepinbell).
grass(victreebel).
grass(exeggcute).
grass(exeggutor).
grass(tangela).
poison(bulbasaur).
poison(ivysaur).
poison(venusaur).
poison(weedle).
poison(kakuna).
poison(beedrill).
poison(ekans).
poison(arbok).
poison(nidoran).
poison(nidorina).
poison(nidoqueen).
poison(nidoran).
poison(nidorino).
poison(nidoking).
poison(zubat).
poison(golbat).
poison(oddish).
poison(gloom).
poison(vileplume).
poison(venonat).
poison(venomoth).
poison(bellsprout).
poison(weepinbell).
poison(victreebel).
poison(tentacool).
poison(tentacruel).
poison(grimer).
poison(muk).
poison(gastly).
poison(haunter).
poison(gengar).
poison(koffing).
poison(weezing).
fire(charmander).
fire(charmeleon).
fire(charizard).
fire(vulpix).
fire(ninetales).
fire(growlithe).
fire(arcanine).
fire(ponyta).
fire(rapidash).
fire(magmar).
fire(flareon).
fire(moltres).
flying(charizard).
flying(butterfree).
flying(pidgey).
flying(pidgeotto).
flying(pidgeot).
flying(spearow).
flying(fearow).
flying(zubat).
flying(golbat).
flying(farfetchd).
flying(doduo).
flying(dodrio).
flying(scyther).
flying(gyarados).
flying(aerodactyl).
flying(articuno).
flying(zapdos).
flying(moltres).
flying(dragonite).
water(squirtle).
water(wartortle).
water(blastoise).
water(psyduck).
water(golduck).
water(poliwag).
water(poliwhirl).
water(poliwrath).
water(tentacool).
water(tentacruel).
water(slowpoke).
water(slowbro).
water(seel).
water(dewgong).
water(shellder).
water(cloyster).
water(krabby).
water(kingler).
water(horsea).
water(seadra).
water(goldeen).
water(seaking).
water(staryu).
water(starmie).
water(magikarp).
water(gyarados).
water(lapras).
water(vaporeon).
water(omanyte).
water(omastar).
water(kabuto).
water(kabutops).
bug(caterpie).
bug(metapod).
bug(butterfree).
bug(weedle).
bug(kakuna).
bug(beedrill).
bug(paras).
bug(parasect).
bug(venonat).
bug(venomoth).
bug(scyther).
bug(pinsir).
normal(pidgey).
normal(pidgeotto).
normal(pidgeot).
normal(rattata).
normal(raticate).
normal(spearow).
normal(fearow).
normal(clefairy).
normal(clefable).
normal(jigglypuff).
normal(wigglytuff).
normal(meowth).
normal(persian).
normal(farfetchd).
normal(doduo).
normal(dodrio).
normal(lickitung).
normal(chansey).
normal(kangaskhan).
normal(tauros).
normal(ditto).
normal(eevee).
normal(porygon).
normal(snorlax).
electric(pikachu).
electric(raichu).
electric(magnemite).
electric(magneton).
electric(voltorb).
electric(electabuzz).
electric(jolteon).
electric(zapdos).
earth(sandshrew).
earth(sandslash).
earth(nidoqueen).
earth(nidoking).
earth(diglett).
earth(dugtrio).
earth(geodude).
earth(graveler).
earth(golem).
earth(onix).
earth(cubone).
earth(marowak).
earth(rhyhorn).
earth(rhydon).
fighting(mankey).
fighting(primeape).
fighting(poliwrath).
fighting(machop).
fighting(machoke).
fighting(machamp).
fighting(hitmonlee).
fighting(hitmonchan).
psychic(abra).
psychic(kadabra).
psychic(alakazam).
psychic(slowpoke).
psychic(slowbro).
psychic(drowzee).
psychic(hypno).
psychic(exeggcute).
psychic(exeggutor).
psychic(starmie).
psychic(mr_mime).
psychic(jynx).
psychic(mewtwo).
psychic(mew).
rock(geodude).
rock(graveler).
rock(golem).
rock(onix).
rock(rhyhorn).
rock(rhydon).
rock(omanyte).
rock(omastar).
rock(kabuto).
rock(kabutops).
rock(aerodactyl).
steel(magnemite).
steel(magneton).
ice(dewgong).
ice(cloyster).
ice(jynx).
ice(lapras).
ice(articuno).
ghost(gastly).
ghost(haunter).
ghost(gengar).
dragon(dratini).
dragon(dragonair).
dragon(dragonite).
evolution(kadabra,abra).
evolution(alakazam,kadabra).
evolution(charmeleon,charmander).
evolution(charizard,charmeleon).
evolution(ivysaur,bulbasaur).
evolution(venusaur,ivysaur).
evolution(wartortle,squirtle).
evolution(blastoise,wartortle).
evolution(raichu,pikachu).
evolution(raichu,pikachu).
evolution(arbok,ekans).
evolution(arcanine,growlithe).
evolution(kakuna,weedle).
evolution(beedrill,kakuna).
evolution(weepinbell,bellsprout).
evolution(victreebel,weepinbell).
evolution(metapod,caterpie).
evolution(butterfree,metapod).
evolution(clefable,clefairy).
evolution(cloyster,shellder).
evolution(marowak,cubone).
evolution(dewgong,seel).
evolution(dugtrio,diglett).
evolution(dodrio,doduo).
evolution(dragonair,dratini).
evolution(dragonite,dragonair).
evolution(drowzee,hypno).
evolution(flareon,eevee).
evolution(jolteon,eevee).
evolution(vaporeon,eevee).
evolution(electrode,voltorb).
evolution(exeggutor,exeggcute).
evolution(fearow,spearow).
evolution(haunter,gastly).
evolution(gengar,haunter).
evolution(graveler,geodude).
evolution(golem,graveler).
evolution(gloom,oddish).
evolution(vileplume,gloom).
evolution(golbat,zubat).
evolution(seaking,golden).
evolution(golduck,psyduck).
evolution(muk,grimer).
evolution(gyarados,magikarp).
evolution(seadra,horsea).
evolution(wigglytuff,jigglypuff).
evolution(kabutops,kabuto).
evolution(kingler,krabby).
evolution(weezing,koffing).
evolution(machoke,machop).
evolution(machamp,machoke).
evolution(magneton,magnemite).
evolution(primeape,mankey).
evolution(mewtwo,mew).
evolution(persian,meowth).
evolution(persian,meowth).
evolution(nidorina,nidoran).
evolution(nidoqueen,nidorina).
evolution(nidorino,nidoran).
evolution(nidoqueen,nidorino).
evolution(ninetales,vulpix).
evolution(omastar,omanyte).
evolution(parasect,paras).
evolution(pidgeotto,pidgey).
evolution(pidgeot,pidgeotto).
evolution(poliwhirl,poliwag).
evolution(poliwrath,poliwhirl).
evolution(rapidash,polyta).
evolution(raticate,rattata).
evolution(rhyhorn,rhydon).
evolution(sandslash,sandshrew).
evolution(slowbro,slowpoke).
evolution(starmie,staryu).
evolution(tentacruel,tentacool).
evolution(venomoth,venonat).
evolution(A,B):-evolution(A,C),evolution(C,B).
stone_evolution(ninetales,fire_stone).
stone_evolution(arcanine,fire_stone).
stone_evolution(flareon,fire_stone).
stone_evolution(vileplume,leaf_stone).
stone_evolution(victreebel,leaf_stone).
stone_evolution(exeggutor,leaf_stone).
stone_evolution(poliwrath,water_stone).
stone_evolution(cloyster,water_stone).
stone_evolution(starmie,water_stone).
stone_evolution(vaporeon,water_stone).
stone_evolution(raichu,thunder_stone).
stone_evolution(jolteon,thunder_stone).
stone_evolution(nidoqueen,moon_stone).
stone_evolution(nidoking,moon_stone).
stone_evolution(clefable,moon_stone).
stone_evolution(wigglytuff,moon_stone).
natural_evolution(A):- \+ stone_evolution(A,_).
super_effective(A,B) :- water(A), fire(B);
water(A), earth(B);
water(A), rock(B);
fire(A), ice(B);
fire(A), grass(B);
fire(A), bug(B);
fire(A), steel(B);
grass(A), water(B);
grass(A), earth(B);
grass(A), rock(B);
electric(A), water(B);
electric(A), flying(B);
ice(A), grass(B);
ice(A), earth(B);
ice(A), flying(B);
ice(A), dragon(B);
fighting(A), normal(B);
fighting(A), ice(B);
fighting(A), rock(B);
fighting(A), steel(B);
poison(A), grass(B);
earth(A), fire(B);
earth(A), electric(B);
earth(A), poison(B);
earth(A), rock(B);
earth(A), steel(B);
flying(A), grass(B);
flying(A), fighting(B);
flying(A), bug(B);
psychic(A), fighting(B);
psychic(A), poison(B);
bug(A), grass(B);
bug(A), psychic(B);
rock(A), fire(B);
rock(A), ice(B);
rock(A), flying(B);
rock(A), bug(B);
ghost(A), psychic(B);
ghost(A), rock(B);
dragon(A), dragon(B);
steel(A), ice(B);
steel(A), rock(B).
ineffective(A,B) :- normal(A), ghost(B);
electric(A), earth(B);
fighting(A), ghost(B);
poison(A), steel(B);
earth(A), flying(B);
ghost(A), normal(A).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment