Most Up To Date Pokémon Simulator

Pokémon Online is the most popular, accurate, and complete Pokémon battle simulator out there. Open source, it's currently available in 11 languages, on your computer or your Android device. It hosts more than a million battles per month. Download the latest version and enjoy competitive battles across all six generations in real time against trainers from around the world!

Download
v 2.5.0


Val - A semi-automated, modular Wiki bot for the Pokémon Online Wiki

Discussion in 'Developer's Den' started by Desolate, Mar 12, 2012.

  1. Desolate

    Desolate Member

    Messages:
    84
    First off, I am posting this in the "Simulator Development" part of the forums rather than the PO Wiki part because also this bot is doing Wiki-exclusive tasks now, I am hoping to develop it even further so it can evolve into a bot alike Shanai to run on the server.

    This thread will function as somewhat of a change log, a reminder to myself and other developers on what to do, as well as a behind the scenes look for regular users.

    Like the title says, Val is semi-automated, relying on both user input for some tasks, and for others, no user input whatsoever. In addition to being semi-automated, Val is also modular, so modules can be willfully removed and added at any time, even while the bot is running (so there's no need for a restart).

    The bot is written solely in Python, and tested on Python 2.7.x, so I can't guarantee it will work with any versions lower than 2.7.x or any later versions as well. The framework is derived off of Pywikipedia.

    I will get around to publishing the framework soon, and the modules at a later time. Give me a few days (from the time of this post) to clean up the code so I can publicize it.

    For now, though, I am going to make a list of things done and things to do. Feel free to leave a comment with any feedback, may it be questions, comments, etc.

    Things that are done:

    • Main framework built
      • family/pokemon-online_child.py - this framework has support for multiple Wikis, not just one; in this case, pokemon-online is the child or Wiki name, the contents of the file contains the configuration exclusive to that child or Wiki
      • login.py - initialization script that waits for the user to input the bot password and then returns the status of the log in accordingly (if successfully, the response will be much more verbose than it would be if it resulted in a failure)
      • user-config.py - a simple text file that contains information such as the Wiki's language, the child that corresponds to that Wiki, the bot name, and the character encoding (by default, it's UTF-8)
    Things to do:

    • Make the list of things to do

    When I eventually clean up the code enough for it to be published and I host it on the site of my choice, I will make a bug tracker and issue manager along with it where I can record the milestones, progress, etc. of the bot.
  2. Blastcore

    Blastcore Developer

    Messages:
    763
    OH! No moar bots plz. They'll dominate us! Shanai killed Nixeagle, now Val will kill Oh Desolate!

    Nice! :D

    Infinite-loop suspected.
  3. Desolate

    Desolate Member

    Messages:
    84
    Luckily I learned from Shanai and coded Val in a program that isn't meant for AI development. Besides, Val will never be as smart as a human, she does have sysop access on the Wiki though. :o

    Note to self: add an emergency shutoff switch!
  4. Kalashnikov

    Kalashnikov Despite the code quality

    Messages:
    434
    I don't see the most important part: What's the purpose? An what can it do right now? Or at least, what exactly do you plan to make?
  5. Desolate

    Desolate Member

    Messages:
    84
    The purpose is to essentially perform tasks that would be too tedious for a human to do, such as editing and inspecting edits recursively. Right now, there are a few modules I've thrown together:

    • append.py - add text to the top of all pages in a category, this will be useful when we want to add certain templates
    • redirect.py - removes double redirects as well as broken ones
    • external.py - finds and reports broken external links across either the HTTPS or HTTP protocol (I'll eventually implement other protocols (IRC, FTP, etc.) and have the bot remove them, rather than simply flagging them)
    • sandbox.py - I am planning to create a sandbox page for new editors to practice on, so this will help clean up the page periodically, probably by using a cron job
    • copyright.py - checks for copyright violations by running the content through Google or another search engine
    I'm open to suggestions about other modules to code up and implement.
  6. Lamperi

    Lamperi I see what you did there Super Moderator

    Messages:
    2,647
    Shanai did most of the automated work for the Wiki, ie importing pokemon data. What are you trying to do?
  7. Desolate

    Desolate Member

    Messages:
    84
    Seeing as Shanai is on a hiatus along with nixeagle for an undefined amount of time, Val will hopefully serve as both an anti-vandal Wiki bot with features to improve the cosmetics and actual content of the Wiki using some sort of algorithm I'm currently coding and a bot to relay recent changes, vandals, etc. to either an IRC channel or a channel on the beta server regarding the Wiki, I just need to touch up my knowledge of the network protocol that PO is running and make a Python bridge to connect and function on the server itself.

    tl;dr an anti-vandal bot for the Wiki with other pending features that aren't exclusive to the Wiki, or do not involve it at all
  8. Lamperi

    Lamperi I see what you did there Super Moderator

    Messages:
    2,647
    CONTACT ME. I have the files you need to hook up python with PO servers.
  9. Kalashnikov

    Kalashnikov Despite the code quality

    Messages:
    434
  10. Desolate

    Desolate Member

    Messages:
    84
    If you read the OP, you'll see that I directly say the framework is a derivative of PyWikipediaBot. :) Pywikipedia is a skeleton for tasks that require user input, whereas Val is going to integrate those tasks as well as recursive ones that do not rely on any user input whatsoever (hence semi-automated). The reason the modules I've listed now are identical to the ones of PyWikipediaBot because it would be common sense that if you were building a program, you would start with what you already have before going ahead and making your own. Like I said in my OP and all throughout this post, Val is a fork of PyWikipediaBot, others bots, as well as other modules I'm working on exclusively for PO (Shanai-esque functionality).

Share This Page