Github Showdown

broken image


Hello all Pokemon Showdown users,
  1. Npm Convert Markdown To Html
  2. Pokemon Showdown Github

Github MD flavor extension for Showdown JavaScript BSD-2-Clause 4 7 2 0 Updated Nov 20, 2015. Table-extension Add markdown table flavor to showdown. Desktopr 1 8 – create dynamic desktops. Angular Showdown Demo! - yisraelx.github.io. Join the Discord!


My username is onmabd, and I have been actively using Pokemon Showdown because I think it is an amazing website.
About 6 months ago, I started a project to build an artificial intelligence bot for Pokemon Showdown that would play the game and make smart decisions and potentially compete with humans. I also wanted the bot to be usable by every user of Pokemon Showdown to help improve their own skills or to experiment with different teams.
Github
A lot of work has been done and I think it's ready for an alpha-stage release! I can't guarantee it will work on your computer, but if you have the latest Windows and latest Chrome or Firefox, it will probably work. That being said, I would really, really appreciate that if you find any bugs or have any feedback to email me at pokemonshowdownbot@gmail.com or post an issue on the Github repo. I will definitely continue to work on this project and improve its stability and add more features.
How to install:
  1. Download the appropriate .zip file corresponding to your operating system from: https://github.com/vasumv/pokemon_ai/releases/tag/0.0.1
  2. Unzip the .zip file.
Github Showdown
A lot of work has been done and I think it's ready for an alpha-stage release! I can't guarantee it will work on your computer, but if you have the latest Windows and latest Chrome or Firefox, it will probably work. That being said, I would really, really appreciate that if you find any bugs or have any feedback to email me at pokemonshowdownbot@gmail.com or post an issue on the Github repo. I will definitely continue to work on this project and improve its stability and add more features.
How to install:
  1. Download the appropriate .zip file corresponding to your operating system from: https://github.com/vasumv/pokemon_ai/releases/tag/0.0.1
  2. Unzip the .zip file.
How to use:
  1. Run the showdownbot.exe (for Windows)/showdownbot (for Linux). It should open a tab in your default browser with a GUI for using the bot.
  2. Specify your username/password and which browser you want to use. Make sure you have the browser you have selected installed on your computer. Note: phantomjs does not need to be installed, but is VERY SLOW on Windows.
  3. You can add your own teams by specifying them in a text file in the teams/ folder inside the showdownai folder. Otherwise, you can copy the text directly into the GUI (Team from text). There are also default teams available.
  4. Specify the number of games(iterations) you want the bot to play.
  5. Optionally, you challenge a user who is online in the Lobby of Showdown. Specify that user if you would like to challenge.
  6. Click the Play button! This should open a browser window if you selected Chrome or Firefox. The bot should log on as you, create a team, and start playing on the ladder/challenge a user.
Important Notes:
  • Usernames and passwords are sent in PLAINTEXT, so make sure you're using the bot on a safe network or you're using a disposable password.
  • Usernames must be registered and have an associated password to log in.
  • Right now, the bot only works with the OU tier, but future releases will expand that to more tiers.
  • You may run multiple bots at once, but make sure they each have different usernames.
  • The bot can take a long time to 'think', depending on the speed of your computer. On average, I see it take from 10 seconds to a minute to decide on a move. However, it will get faster at making decisions the longer the match goes on.
  • Crashes will periodically occur. You will see this when the bot forfeits or runs out of time to make the decision. Right now there's no easy way to see the crash log, but that will come in a future release.
How to contribute:
The project is fully open-source on Github at https://github.com/vasumv/pokemon_ai/ and is implemented entirely in Python 2.7. If you have ideas or bugfixes, feel free to create issues and create pull requests.
How does it work?
The bot uses the minimax algorithm. This algorithm will simulate all of the user's actions and all of the opponent's actions, resulting in a state of the game that will be evaluated with a score showing how well the user is doing. Then, the algorithm will choose the best action for the user in order to minimize the losses.
The problem with using minimax on Pokemon Showdown games is that we need to know all of the opponent's moves beforehand. We obviously know which Pokemon he can switch into, but we are unsure of what moves each of the six Pokemon have until they make those moves. So, in order to use minimax, we must make a prediction of what moves the other Pokemon has, just like we do as humans. To do this, I downloaded about 11,000 battle logs from replays.pokemonshowdown.com of the top 500 users of the OU and UU ladders and created a graph: each node was a move and an edge corresponded to the number of times it co-occurred with another move (node). Now, I have a bot that will predict what the moves of the other team are based on what moves it has seen and the battle logs it has parsed.
I ran the bot on the OU ladder for about 200 games, and it is shown to play by about the standard of an average Showdown player(~1300-1350).
tl;dr
Check out this bot that will play Pokemon Showdown like a human would! Use it to train yourself if you're a beginner or test out new teams!

Because GitHub's README styling is actually really nice

Background

If you have a little side project, often you might want a simple landing page. The GitHub README rendering is really beautifully done: clean, simple and modern. The official GitHub markdown to HTML API generates the HTML code, but not the stylesheets necessary to make it look nice.

Using your GitHub README as the main landing point works great for open source projects, where your visitors are developers and are familiar with GitHub, as well as you have all the text right where the code, the Issues and PRs are. But for some projects this isn't ideal. I built this project within a few hours for myself to get WalkWithFriends off the ground fast, without investing in building an actual website, or using a bloated website builder.

Some issues you run into when using GitHub as your main landing page

  • Maybe your project isn't actually an open source project, so you can't just host a README on GitHub
  • If you want to link to just the README, you could append #readme to your browser URL (making the URL less pretty), or the visitor has to know they have to scroll down
  • The mobile page of GitHub is still pretty bad, and it only renders the first few lines, as soon as you have a logo and badges on your page, it doesn't render at all, unless the visitor hits View all ofREADME.md
    • Non-tech visitors don't know what's a README.md
    • The button is small, and people don't know what is
    • GitHub renders the GitHub Pulse below, something that doens't make sense for non-tech visitors
    • The URL changes from something nice like github.com/krausefx/fastlane to github.com/krausefx/fastlane/blob/master/README.md, meaning you can either link directly to this page to have a nice content, or you link to the root page and have the downside of the extra buttons
    • Nat announced, that they working on improving the mobile experience, which is great news for everybody :)
  • You can't use your own domain
  • If you use your own domain, you have to use GitHub Pages (which is excellent btw), but then you have to have HTML files ready, which is exactly what this project solves.

Solution

A simple script that converts a markdown (.md) file to a single HTML file, that includes all the HTML and CSS code inline, so you can host it anywhere.

There is no need to use this script if you already convert your markdown file to HTML, you can directly use the stylesheet of this repo.

How it works

This project doesn't actually use the GitHub stylesheet, it's far too complex, and has legal implications.

Instead this project does 2 things:

  • Convert the Markdown to HTML using showdown, the most popular JS markdown parser. This could be replaced by the official GitHub markdown to HTML API
  • Inject the GitHub-like CSS code at the bottom of the page

Npm Convert Markdown To Html

Resulting you get an HTML file that contains everything needed, so you can host the page on GitHub pages, AWS S3, Google Cloud Storage or anywhere else. Cyberduck 6 8 0.

  • Check out the original markdown file of this README
  • Check out the raw generated HTML code generated based on this markdown file on
  • Check out the GitHub rendered README
  • Check out the README rendered by this project

Usage

This will read the README.md from your current working directory and output the resulting HTML as README.html to the same directory.

Open tasks

Check out the open issues, in particular code blocks currently don't support syntax highlighting, however that's something that's rather easy to add. For a minimalistic stylesheet we could take the styles from krausefx.com css.

Playground to test

  • Bullet list item 1
  • Bullet list item 2
    • Bullet list item 2.1
    • Bullet list item 2.2
  1. Numbered list item 1
  2. Numbered list item 2

Inline code comments are 100

Quoted texts are more gray and look differently

Bold text is bold and inline links work as well.

Header 2

Header 3

Header 4

Header 5

Normal text content again, lorem ipsum

Text 1 Text 2 Text 3
Text 1 Text 2 Text 3
Text 1 Text 2 Text 3

Pokemon Showdown Github

🔰 Raw HTML code for custom style 🔰





broken image