{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/870d613430249e453343efc9667ef636?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"870d613430249e453343efc9667ef636","url":"https://api.github.com/users/encukou","login":"encukou","id":302922},"milestone":null,"assignee":null,"labels":[{"name":"feature","color":"FFFFFF","url":"https://api.github.com/repos/encukou/test-0/labels/feature"},{"name":"gadgets","color":"FFFFFF","url":"https://api.github.com/repos/encukou/test-0/labels/gadgets"},{"name":"immediate","color":"FFFFFF","url":"https://api.github.com/repos/encukou/test-0/labels/immediate"},{"name":"involved","color":"FFFFFF","url":"https://api.github.com/repos/encukou/test-0/labels/involved"}],"updated_at":"2011-11-03T18:48:31Z","closed_at":null,"comments":0,"url":"https://api.github.com/repos/encukou/test-0/issues/48","body":"**Reported by [Eevee](http://bugs.veekun.com/users/1) on 2009/08/12 23:00:16 +0000 · Migrated from [Redmine issue 68](http://bugs.veekun.com/issues/68)**\n\n---\n\nThis is hard and I don’t know what to do about it.\n\nI think I may have to drop the whole Pokémon chart thing and just show the names and sprites. Maybe use encounter data to figure out how hard they are to actually obtain.\n\nAlso, try to draw a family tree of some sort?\n\nAnd what about TMs…\n\nCheck old Trac for a bunch of complaints about the current system.\n\nReferences:\n\n*  [Smogon’s list of illegal movesets](http://www.smogon.com/forums/showthread.php?t=63782)\n\n*  [Sabresite’s notes on chain breeding](http://projectpokemon.org/forums/showthread.php?668-Chain-Breeding)\n\n\n\n    Redmine metadata:\n    Updated on: 2011/04/28 12:17:22 +0000\n    Start date: 2009/08/12\n    Done ratio: 40%\n    Relations:\n        duplicated #687\n\n---\n\n**Comment by [En-Cu-Kou](http://github.com/encukou) from 2011/04/28 12:17:22 +0000**\n\nMaybe I should go all the way and write a C extension.\n\n\n\n\n---\n\n**Comment by [En-Cu-Kou](http://github.com/encukou) from 2011/04/28 01:20:40 +0000**\n\nEvery move a pokémon can learn would be simpler: now that pre-evos are in, just add Ninjask’s moves to Shedinja, everything but Chatter and Struggle to Smeargle, and all the event & colosseum pokémon…. That should be pretty much it I guess.\n\nAnd yes, it’s not elegant code at all. Unfortunately, a beautiful (er) implementation using ORM objects took 5 seconds where this takes less than one. And in this case it matters :(\nOh, and I got some people to design tests for some of the corner cases. Those don’t really simplify things :(\n\nAs for the logic itself, well, most of it is quite simple – for a thousand lines of mostly algorithmic code, anyway.\nFirst load everything that could be of use to appropriate data structures (minimizing no. of queries), then there’s the confusing part about making the breed graph (it figures out which movesets are worthwile to pass to which egg groups, which serves to limit unnecessary breeding; run with -dd to see the output), and then there’s a standard state space search in the Node classes which figure out what can be done with the pokémon next – quite easy to follow the big picture if you look at the method names, and the details aren’t all that hard to follow either IMO.\n\n\n\n\n---\n\n**Comment by [Eevee](http://bugs.veekun.com/users/1) from 2011/04/28 00:30:34 +0000**\n\nGeneral moveset finding is probably the best way to go about this, yeah. I’ve said somewhere (maybe in redmine, maybe not) that I’d also like some way to see every move a Pokémon can learn and how.\n\nBut the logic, aaaaauahgh.\n\n\n\n\n---\n\n**Comment by [En-Cu-Kou](http://github.com/encukou) from 2011/04/27 23:20:17 +0000**\n\nI made one as well, see the encukou-movesets branch. It validates a pokémon’s moveset by searching for a way to obtain it. It tries to find a reasonable one, but if the user doesn’t like the result, individual pokémon/version groups may be excluded from the search. Currently there’s only a CLI interface.\nWith breeding, trading, tutors, evolution, Sketch, Shedinja, evolution-inducing moves and soon events, even this largely brute-force approach is pretty complicated…\nIt does consume quite a lot of CPU for complicated chains, and even more for complicated illegal combinations. Don’t know if that’s suitable for the web.\nWith some more work it could be expanded to list all pokémon that learn a particular moveset, for use in the Awesome search and/or “list other possible parents” links next to breeding suggestions on the gadget’s result page.\n\n\n\n\n---\n\n**Comment by [Eevee](http://bugs.veekun.com/users/1) from 2010/12/03 06:41:36 +0000**\n\nI have made *a dent*.\n\n\n\n    Done: 0% ⇨ 40%\n\n---\n\n**Comment by [Eevee](http://bugs.veekun.com/users/1) from 2010/10/08 08:01:00 +0000**\n\n\n\n\n\n    Assignee ⇨ —\n\n---\n\n**Comment by [Eevee](http://bugs.veekun.com/users/1) from 2010/10/07 02:00:02 +0000**\n\n\n\n\n\n    Target version: 2010 Q3 ⇨ —\n\n---\n\n**Comment by [Eevee](http://bugs.veekun.com/users/1) from 2010/04/13 19:27:36 +0000**\n\n\n\n\n\n    Target version: 14 ⇨ 16\n\n---\n\n**Comment by [Eevee](http://bugs.veekun.com/users/1) from 2010/04/13 19:43:29 +0000**\n\n\n\n\n\n    Target version: 16 ⇨ 2010 Q3\n\n---\n\n**Comment by [Eevee](http://bugs.veekun.com/users/1) from 2010/09/13 02:32:15 +0000**\n\nBumping this up since the old site is now dead.\n\n\n\n    category_id: None ⇨ 8\n    priority_id: 5 ⇨ 7","html_url":"https://github.com/encukou/test-0/issues/48","number":48,"title":"Breeding chain calculator","id":2136067,"created_at":"2011-11-03T18:48:31Z"},"action":"opened"}