FOSSbot for beginners - How to create a voting bot algorithm
In this post I'll explain for beginners, how to create a custom algorithm for the open source Steem voting bot "FOSSbot"
FOSSbot a free and open source, highly customizable Steem voting bot created by @personz.
To install your own FOSSbot see these instructions
Or go straight to the FOSSbot Github page
https://github.com/Steem-FOSSbot/steem-fossbot-voter/blob/master/docs/installation.md
The bot works by scanning a set number of posts every time the bot runs.
The bot will use the arguments/metrics in your algorithm to assign each post a score and will then vote for the posts with a score that is above the average threshold.
Here is a basic example of an algorithm that tries to find and vote for "good" content.
post_num_words in range 200 to 600, weight = 0.5
post_num_links_image in range 0 to 5, weight = 10
post_num_links_video, weight = -25
author_repuation, weight = 1
post_has_english_language_use, weight = 50
Here is what each argument does:
post_num_words in range 200 to 600, weight = 0.5
If the post has between 200 and 600 words
Then the bot will add 0.5 score points to the post for every word that is more than 200.
If the post has less Than 200 words
Then no score points will be added
If the post has more than 600 words
Then no extra score points will be added after the 600 word limit
post_num_links_image in range 0 to 5, weight = 10
If the post contains between 0 and 5 images
Then 10 score points will be added to the post for every image
If the post has more than 5 images
Then score points will only be added for the first 5 images
post_num_links_video, weight = -25
If the post contains links to videos
Then 25 score points will be subtracted for every video
author_repuation, weight = 1
If the author of the post has 55 reputation points for example
Then 55 points are added to the score of the post
post_has_english_language_use, weight = 50
If the post contains English
Then 50 points are added to the score
The bot will consider a post to be good if:
- the post is at least 200 words long
- the post has a few images
- the post has few or no video links
- the author of the post has some reputation
- the post is in English
Fossbot provides lots of other metrics and settings that can be added to make your bot better. These are only the basics, but if you understood how this example works, you will be able to understand the rest.
I will be posting more algorithm examples soon. Join the FOSSbot project on Github and add your ideas. https://github.com/Steem-FOSSbot/steem-fossbot-voter
Suggestions are welcome and feel free to ask questions in the comments.
Good luck out there!
This is great! Would love to build a small community dedicated to discovering useful algorithms for this amazing bot!
Agreed! Any progress with that small group building?
I use Kaggke instead Heroku. The last ask me for what i don't have -a credit card-. So, i had to avoid it...
Congratulations @camb! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the number of comments received
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Very nice ! thank you for this post
Thank you for the information... very interesting...
Hey iknow this is an old post, but i am trying to create a voting bot to help to steemit community and not for profit. Know i wanted to connect the bot to my dsicord channel. I have no clue how to do this but was wondering if you would please help me with this!
This is for a much bigger project and will give u exposure on the platform aswell!
Hi @bartcardi. FOSSBot currently has no integration with Discord But I think FOSSbot is the best open source voting bot around. You would need a different program for that. Also instead of working on a bot for a closed source app like discord I would recommend looking at Riot/Matrix. Matrix is completely open source with similar fuctions like Discord. https://steemit.com/open-source/@camb/matrix-riot-federated-messenger. Foosbot is created by @personz. He is a very friendly and helpful guy.
Okay thankyou for the reaction. I am looking for someone that can create an votingbot that is connected with discord. Would u maybe like to do that. I can even pay u!
I could not make my algo to work with my community could you help please?