From e09144d4ff2e9de08721516431220dd9841067e6 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Sun, 12 Apr 2015 09:05:00 +0200 Subject: [PATCH 1/6] seed(1428414915): Add v1.4.0 stats Full log below: 1. Pallet Rival: 0:02:06 (02:06) 2. Nidoran grass: 0:05:46 (03:40) 15 7 14 14 beat Brock with a perfect Nidoran! Att: 16, Def: 12, Speed: 15, Special: 13, caught at level 4. 3. Brock's Gym: 0:10:23 (04:37) 4. Mt. Moon: 0:17:46 (07:23) 12 Moon encounters, but we caught a Paras! 5. Mt. Moon: 0:25:58 (08:12) 15 7 14 14 56 45 53 48 6. Nugget Bridge: 0:33:37 (07:39) is limiting heals to attempt to get closer to red-bar off Misty... || 8 7. Misty's Gym: 0:39:16 (05:39) Amazing, 3 try Trashcans! || 0:47:11 8. Surge's Gym: 0:48:10 (08:54) is using Thunderbolt to attempt to redbar off Cubone Giovanni skip strats! 9. HM02 Fly: 0:58:55 (10:45) 10. Pokemon Tower: 1:06:54 (07:59) needs to grab the backup Full Restore here 11. Silph Giovanni: 1:17:46 (10:52) EQ Elixer: Koga's Gym 12. Koga's Gym: 1:21:25 (03:39) 13. Erika's Gym: 1:26:33 (05:08) 14. Blaine's Gym: 1:29:27 (02:54) 15. Sabrina's Gym: 1:31:09 (01:42) EQ Elixer: Sabrina's Gym 16. Giovanni's Gym: 1:34:45 (03:36) is skipping the Center and attempting to red-bar the Elite 4! 17. Lorelei: 1:42:46 (08:01) 18. Bruno: 1:44:01 (01:15) 19. Agatha: 1:45:42 (01:41) 20. Lance: 1:47:36 (01:54) 21. Blue: 1:50:36 (03:00) v1.4: 398208 frames, with seed 1428414915 Please save this seed number to share, if you would like proof of your run! beat the game in 1:50:36! --- Seeds.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Seeds.md b/Seeds.md index 4fda876..9ad0643 100644 --- a/Seeds.md +++ b/Seeds.md @@ -2,10 +2,11 @@ PokéBot comes with a built-in run recording feature that takes advantage of random number seeding to reproduce runs in their entirety. Any time the bot resets or beats the game, it logs a number to the Lua console that is the seed for the run. This seed allows you to easily share the run with others. -Have you found a seed that results in a run of `1:53:00` or better? [Let us know](https://github.com/kylecoburn/PokeBot/issues/4), and we’ll add it to the list! +Have you found a seed that results in a run of 1:53:00 or better? [Let us know](https://github.com/kylecoburn/PokeBot/issues/4), and we’ll add it to the list! | Time | Frames | Seed | Bot version | Found by | |---------|--------|--------------|-------------|----------| +| 1:50:36 | 398208 | `1428414915` | v1.4.0 | Gofigga | | 1:50:37 | 398226 | `1428414915` | v1.3.0 | Gofigga | -To reproduce any of these runs, set [`CUSTOM_SEED` in `main.lua`](https://github.com/kylecoburn/PokeBot/blob/0ec69a6a958d15b3a9dccb492fa83e4a1dcae2e0/main.lua#L5) to the seed number and run the bot. +To reproduce any of these runs, set [`CUSTOM_SEED` in `main.lua`](https://github.com/kylecoburn/PokeBot/blob/0fd1258ca17f7d74edbac72fa0afc2b5c6d58bb3/main.lua#L5) to the seed number and run the bot. From 0f871b978573367e7773684ea10dc10dd3871eeb Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Sun, 12 Apr 2015 09:05:19 +0200 Subject: [PATCH 2/6] Clean up Readme.md --- Readme.md | 68 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/Readme.md b/Readme.md index b713167..b4daa3a 100644 --- a/Readme.md +++ b/Readme.md @@ -1,54 +1,58 @@ -PokéBot -======= -An automated computer program that speedruns Pokémon. +# PokéBot + +An automated computer program that speedruns Pokémon Red, Blue, or Yellow. Pokémon Red Any%: [1:51:11](https://www.youtube.com/watch?v=M4pOlQ-mIoc) (23 June 2014) -Watch Live -========== -### [http://www.twitch.tv/thepokebot](http://www.twitch.tv/thepokebot) -PokéBot's official streaming channel on Twitch. Consider following there to find out when we're streaming, or follow the [Twitter feed](https://twitter.com/thepokebot) for announcements when we get personal best pace runs going. +## Watch live -Try it out -========== -Running the PokéBot on your own machine is easy. You will need a Windows environment (it runs great in VM's on Mac too). First, clone this repository (or download and unzip it) to your computer. Download the [BizHawk 1.6.1](http://sourceforge.net/projects/bizhawk/files/BizHawk/BizHawk-1.6.1.zip/download) emulator, and procure a ROM file of Pokémon Red (you should personally own the game). +### [twitch.tv/thepokebot](http://www.twitch.tv/thepokebot) +PokéBot’s official streaming channel on Twitch. Consider following there to find out when we’re streaming, or follow the [Twitter feed](https://twitter.com/thepokebot) for announcements when we get personal best pace runs going. -##About BizHawk## -BizHawk 1.6.1 (Windows only) is the only version known to work. Later versions, like 1.7.2a do not seem to work, due to differences with reading bytes from memory. +### Run the bot locally -Run the [prereq installer](http://sourceforge.net/projects/bizhawk/files/Prerequisites/bizhawk_prereqs_v1.1.zip/download), which should update a C++ distributable needed by BizHawk +Running the PokéBot on your own machine is easy. You will need a Windows environment (it runs great in VMs on Mac/Linux too). -You can unextract BizHawk-1.6.1.zip anywhere. +1. First, clone this repository (or download and unzip it) to your computer. -##Setting up and verifying the ROM## -The ROM file should `Pokemon Red.gb`. The file name doesn't matter, but upload it to http://www.fileformat.info/tool/hash.htm to verify it's the US version. The linked website will spit out lots of hashes, make sure the two below match: -``` -MD5: 3d45c1ee9abd5738df46d2bdda8b57dc -SHA-1: ea9bcae617fdf159b045185467ae58b2e4a48b9a -``` +2. Download the [BizHawk 1.6.1](http://sourceforge.net/projects/bizhawk/files/BizHawk/BizHawk-1.6.1.zip/download) emulator and extract the ZIP file anywhere you like to “install” it. -Open the ROM file with BizHawk (Drag the .gb file onto EmuHawk), and Pokémon Red should start up. -The colors may look weird. To fix this, go to GB>Palette Editor, and then find the POKEMON RED.pal file which should be under Gameboy>Palettes in the directory where BizHawk was unextracted. + **Note:** BizHawk v1.6.1 (Windows only) is the only version known to work. Later versions like v1.7.2a do not seem to work, due to differences with reading bytes from memory. +3. Run [the BizHawk prerequisites installer](http://sourceforge.net/projects/bizhawk/files/Prerequisites/bizhawk_prereqs_v1.1.zip/download), which should update a C++ distributable needed by BizHawk. -##Running the bot## -If you want to test the full run, change [this line](https://github.com/kylecoburn/PokeBot/blob/52232581f227b829ea283d795ddaf60a52ce24fe/main.lua#L4) to be false. -Then, under the 'Tools' menu, select 'Lua Console'. -Click the open folder button, and navigate to the PokéBot folder you downloaded. Select 'main.lua' and press open. The bot should start running! +4. Procure a ROM file of Pokémon Red (you should personally own the game). + + The ROM file has a name like `Pokemon Red (UE) [S][!].gb`, but the file name doesn’t matter. Upload it to [fileformat.info/tool/hash.htm](http://www.fileformat.info/tool/hash.htm) to verify it’s the correct version. The linked website will spit out lots of hashes; make sure the two below match: + + ``` + MD5: 3d45c1ee9abd5738df46d2bdda8b57dc + SHA-1: ea9bcae617fdf159b045185467ae58b2e4a48b9a + ``` + + Open the ROM file with BizHawk (drag the `.gb` file onto EmuHawk), and Pokémon Red should start up. + + The colors may look weird. To fix this, go to _GB_ → _Palette Editor_, and then find the `POKEMON RED.pal` file which should be under _Gameboy_ → _Palettes_ in the directory where BizHawk was extracted. + +5. If you want to test the full run, set [`RESET_FOR_TIME` in `main.lua`](https://github.com/kylecoburn/PokeBot/blob/0fd1258ca17f7d74edbac72fa0afc2b5c6d58bb3/main.lua#L3) to `false` instead of `true`. + +6. Then, under the _Tools_ menu, select _Lua Console_. Click the “open folder” button, and navigate to the PokéBot folder you downloaded. Select `main.lua` and press “open”. The bot should start running! + +## Seeds -Seeds -===== PokéBot comes with a built-in run recording feature that takes advantage of random number seeding to reproduce runs in their entirety. Any time the bot resets or beats the game, it will log a number to the Lua console that is the seed for the run. If you set `CUSTOM_SEED` in `main.lua` to that number, the bot will reproduce your run, allowing you to [share your times with others](Seeds.md). Note that making any other modifications will prevent this from working. So if you want to make changes to the bot and share your time, be sure to fork the repo and push your changes. -Credits -======= +## Credits + ### Developers + Kyle Coburn: Original concept, Red routing -Michael Jondahl: Combat algorithm, Java bridge for connecting the bot to Twitch chat, Livesplit, Twitter, etc +Michael Jondahl: Combat algorithm, Java bridge for connecting the bot to Twitch chat, LiveSplit, Twitter, etc. ### Special thanks -To Livesplit for providing custom component for integrating in-game time splits. + +To LiveSplit for providing custom component for integrating in-game time splits. To the Pokémon speedrunning community members who inspired the idea, and shared ways to improve the bot. From 4581b8b07bf994c35eb6c42672293a601a11d467 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Sun, 12 Apr 2015 10:46:37 +0200 Subject: [PATCH 3/6] seed(1428801658): Add v1.4.0 stats Full log below: 1. Pallet Rival: 0:01:55 (01:55) 2. Nidoran grass: 0:06:03 (04:08) 15 9 9 10 beat Brock with an okay Nidoran. Att: 16, Def: 13, Speed: 14, Special: 13, caught at level 3. 3. Brock's Gym: 0:10:49 (04:46) 4. Mt. Moon: 0:18:05 (07:16) 10 Moon encounters, but we caught a Paras! 5. Mt. Moon: 0:25:56 (07:51) 15 9 9 10 56 46 50 46 6. Nugget Bridge: 0:33:25 (07:29) 7. Misty's Gym: 0:39:31 (06:06) YOLO enabled at Surge's Gym Good, 7 try Trashcans! || 0:47:45 8. Surge's Gym: 0:48:49 (09:18) is using Thunderbolt to attempt to redbar off Cubone Giovanni skip strats! 9. HM02 Fly: 0:59:20 (10:31) 10. Pokemon Tower: 1:07:03 (07:43) YOLO disabled at Safari Zone 11. Silph Giovanni: 1:17:46 (10:43) EQ Elixer: Koga's Gym 12. Koga's Gym: 1:21:33 (03:47) 13. Erika's Gym: 1:26:47 (05:14) 14. Blaine's Gym: 1:29:43 (02:56) 15. Sabrina's Gym: 1:31:24 (01:41) EQ Elixer: Sabrina's Gym 16. Giovanni's Gym: 1:34:55 (03:31) is skipping the Center and attempting to red-bar the Elite 4! 17. Lorelei: 1:42:55 (08:00) 18. Bruno: 1:44:21 (01:26) 19. Agatha: 1:46:10 (01:49) 20. Lance: 1:47:59 (01:49) 21. Blue: 1:50:55 (02:56) v1.4: 399355 frames, with seed 1428801658 Please save this seed number to share, if you would like proof of your run! beat the game in 1:50:55! --- Seeds.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Seeds.md b/Seeds.md index 9ad0643..f66a11b 100644 --- a/Seeds.md +++ b/Seeds.md @@ -2,11 +2,12 @@ PokéBot comes with a built-in run recording feature that takes advantage of random number seeding to reproduce runs in their entirety. Any time the bot resets or beats the game, it logs a number to the Lua console that is the seed for the run. This seed allows you to easily share the run with others. -Have you found a seed that results in a run of 1:53:00 or better? [Let us know](https://github.com/kylecoburn/PokeBot/issues/4), and we’ll add it to the list! +Have you found a seed that results in a run of 1:52:00 or better? [Let us know](https://github.com/kylecoburn/PokeBot/issues/4), and we’ll add it to the list! -| Time | Frames | Seed | Bot version | Found by | -|---------|--------|--------------|-------------|----------| -| 1:50:36 | 398208 | `1428414915` | v1.4.0 | Gofigga | -| 1:50:37 | 398226 | `1428414915` | v1.3.0 | Gofigga | +| Time | Frames | Seed | Bot version | Found by | +|---------|--------|--------------|-------------|----------------------------------------------| +| 1:50:36 | 398208 | `1428414915` | v1.4.0 | [Gofigga](http://www.twitch.tv/gofigga) | +| 1:50:37 | 398226 | `1428414915` | v1.3.0 | [Gofigga](http://www.twitch.tv/gofigga) | +| 1:50:55 | 399355 | `1428801658` | v1.4.0 | [Marcin1503](https://github.com/Marcin1503) | To reproduce any of these runs, set [`CUSTOM_SEED` in `main.lua`](https://github.com/kylecoburn/PokeBot/blob/0fd1258ca17f7d74edbac72fa0afc2b5c6d58bb3/main.lua#L5) to the seed number and run the bot. From bcd5f7f10447fef877899233218d72723fbab8ad Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Sun, 12 Apr 2015 13:41:59 +0200 Subject: [PATCH 4/6] seed(1428414915): Add v1.4.1 stats Full log below: 1. Pallet Rival: 0:02:06 (02:06) 2. Nidoran grass: 0:05:46 (03:40) 15 7 14 14 beat Brock with a perfect Nidoran! Att: 16, Def: 12, Speed: 15, Special: 13, caught at level 4. 3. Brock's Gym: 0:10:23 (04:37) 4. Route 3: 0:17:46 (07:23) 12 Moon encounters, but we caught a Paras! 5. Mt. Moon: 0:25:58 (08:12) RCE 5413 15 7 14 14 56 45 53 48 6. Nugget Bridge: 0:33:22 (07:24) 7. Misty's Gym: 0:38:59 (05:37) gen 1 missed :( (1 in 256 chance) PERFECT, 1 try Trashcans! || 0:47:39 8. Surge's Gym: 0:48:40 (09:41) is using Thunderbolt to attempt to redbar off Cubone Giovanni skip strats! 9. HM02 Fly: 0:59:04 (10:24) 10. Pokemon Tower: 1:06:45 (07:41) 11. Silph Giovanni: 1:17:18 (10:33) EQ Elixer: Koga's Gym 12. Koga's Gym: 1:21:00 (03:42) 13. Erika's Gym: 1:26:16 (05:16) 14. Blaine's Gym: 1:29:19 (03:03) 15. Sabrina's Gym: 1:31:11 (01:52) EQ Elixer: Sabrina's Gym gen 1 missed :( (1 in 256 chance) 16. Giovanni's Gym: 1:34:52 (03:41) is skipping the Center and attempting to red-bar the Elite 4! 17. Lorelei: 1:43:01 (08:09) 18. Bruno: 1:44:27 (01:26) 19. Agatha: 1:46:08 (01:41) 20. Lance: 1:47:56 (01:48) 21. Blue: 1:50:51 (02:55) v1.4.1: 399076 frames, with seed 1428414915 Please save this seed number to share, if you would like proof of your run! beat the game in 1:50:51! --- Seeds.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Seeds.md b/Seeds.md index f66a11b..a20c983 100644 --- a/Seeds.md +++ b/Seeds.md @@ -2,12 +2,13 @@ PokéBot comes with a built-in run recording feature that takes advantage of random number seeding to reproduce runs in their entirety. Any time the bot resets or beats the game, it logs a number to the Lua console that is the seed for the run. This seed allows you to easily share the run with others. -Have you found a seed that results in a run of 1:52:00 or better? [Let us know](https://github.com/kylecoburn/PokeBot/issues/4), and we’ll add it to the list! +Have you found a seed that results in a run of 1:52:00 or better using the bot’s default settings? [Let us know](https://github.com/kylecoburn/PokeBot/issues/4), and we’ll add it to the list! | Time | Frames | Seed | Bot version | Found by | |---------|--------|--------------|-------------|----------------------------------------------| | 1:50:36 | 398208 | `1428414915` | v1.4.0 | [Gofigga](http://www.twitch.tv/gofigga) | | 1:50:37 | 398226 | `1428414915` | v1.3.0 | [Gofigga](http://www.twitch.tv/gofigga) | +| 1:50:51 | 399076 | `1428414915` | v1.4.1 | [Gofigga](http://www.twitch.tv/gofigga) | | 1:50:55 | 399355 | `1428801658` | v1.4.0 | [Marcin1503](https://github.com/Marcin1503) | -To reproduce any of these runs, set [`CUSTOM_SEED` in `main.lua`](https://github.com/kylecoburn/PokeBot/blob/0fd1258ca17f7d74edbac72fa0afc2b5c6d58bb3/main.lua#L5) to the seed number and run the bot. +To reproduce any of these runs, set [`CUSTOM_SEED` in `main.lua`](https://github.com/kylecoburn/PokeBot/blob/27aa1dcd2cec1bbe25607fa346836f63b349ad5f/main.lua#L5) to the seed number and run the bot. From a7f792233fcf347fc515437ae6e38d8865d83266 Mon Sep 17 00:00:00 2001 From: Pariah Jones Date: Sun, 12 Apr 2015 19:21:50 -0400 Subject: [PATCH 5/6] Screenshot of completed Seed This adds an automated screenshot once a run is completed including version, seed, frames and if reset for time. This has been added for easier sharing of seeds. --- ai/red/strategies.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ai/red/strategies.lua b/ai/red/strategies.lua index eded992..1fba363 100644 --- a/ai/red/strategies.lua +++ b/ai/red/strategies.lua @@ -2284,6 +2284,17 @@ strategyFunctions.champion = function() return Strategies.hardReset("Back to the grind - you can follow on Twitter for updates on our next good run! https://twitter.com/thepokebot") end if status.tries == 0 then + if STREAMING_MODE and CUSTOM_SEED ~= nil then + gui.text(0, 0, "PokeBot v"..VERSION) + gui.text(0, 7, "Seed: "..Strategies.seed) + gui.text(0, 14, "Reset for time: "..tostring(RESET_FOR_TIME)) + gui.text(0, 21, "Time: "..Utils.elapsedTime()) + gui.text(0, 28, "Frames: "..Utils.frames()) + client.setscreenshotosd(true) + client.screenshot() + client.setscreenshotosd(false) + gui.cleartext() + end Strategies.tweetProgress("Beat Pokemon Red in "..status.canProgress.."!") if Strategies.seed then print("v"..VERSION..": "..Utils.frames().." frames, with seed "..Strategies.seed) From 924ea73b990d391a11ae1bd8ca11e2db7519be24 Mon Sep 17 00:00:00 2001 From: kyle Date: Mon, 13 Apr 2015 00:11:54 -0700 Subject: [PATCH 6/6] =?UTF-8?q?Add=20ThePok=C3=A9Bot's=20latest=20PB=20see?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Seeds.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Seeds.md b/Seeds.md index a20c983..cd5ad87 100644 --- a/Seeds.md +++ b/Seeds.md @@ -4,11 +4,12 @@ PokéBot comes with a built-in run recording feature that takes advantage of ran Have you found a seed that results in a run of 1:52:00 or better using the bot’s default settings? [Let us know](https://github.com/kylecoburn/PokeBot/issues/4), and we’ll add it to the list! -| Time | Frames | Seed | Bot version | Found by | -|---------|--------|--------------|-------------|----------------------------------------------| -| 1:50:36 | 398208 | `1428414915` | v1.4.0 | [Gofigga](http://www.twitch.tv/gofigga) | -| 1:50:37 | 398226 | `1428414915` | v1.3.0 | [Gofigga](http://www.twitch.tv/gofigga) | -| 1:50:51 | 399076 | `1428414915` | v1.4.1 | [Gofigga](http://www.twitch.tv/gofigga) | -| 1:50:55 | 399355 | `1428801658` | v1.4.0 | [Marcin1503](https://github.com/Marcin1503) | +| Time | Frames | Seed | Nidoran name | Bot version | Found by | +|---------|---------|--------------|--------------|-------------|----------------------------------------------| +| 1:50:11 | 396,858 | `1428898417` | , | v1.4.2 | ThePokéBot | +| 1:50:36 | 398,208 | `1428414915` | A | v1.4.0 | [Gofigga](http://www.twitch.tv/gofigga) | +| 1:50:37 | 398,226 | `1428414915` | A | v1.3.0 | [Gofigga](http://www.twitch.tv/gofigga) | +| 1:50:51 | 399,076 | `1428414915` | A | v1.4.1 | [Gofigga](http://www.twitch.tv/gofigga) | +| 1:50:55 | 399,355 | `1428801658` | A | v1.4.0 | [Marcin1503](https://github.com/Marcin1503) | To reproduce any of these runs, set [`CUSTOM_SEED` in `main.lua`](https://github.com/kylecoburn/PokeBot/blob/27aa1dcd2cec1bbe25607fa346836f63b349ad5f/main.lua#L5) to the seed number and run the bot.