Jump to content



Welcome to Yu-Gi-Oh! ETC Forums

Welcome to Yu-Gi-Oh! ETC Forums, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of Yu-Gi-Oh! ETC Forums by signing in or creating an account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Customize your experience here
Guest Message by DevFuse
 

Mafia Bot for IRC Chat


  • Please log in to reply
18 replies to this topic

#1 Bass

Bass

    Are you ready guys?

  • Members
  • 6,769 posts
  • Gender: Male

Posted 23 June 2010 - 01:25 PM

So I have some free time and have decided to make a bot that hosts quick mafia games on IRC. It isn't done yet, but fairly soon I will try to have a working version of it. When this happens, I will need a minimum of five people to test it for me.

The bot will be on the channel #etcmafia on the xerocreative server (if you use the link on the board index instead a stand alone IRC client, then just type "/join #etcmafia" after you connect).

Post here if you are willing to help me with the testing. I will post updates in this thread as progress is made.

#2 Krizz

Krizz

    The Terror of the Void

  • Administrators
  • 11,726 posts
  • Gender: Male
  • Location: Buffalo, New York

Posted 23 June 2010 - 01:33 PM

I'll do it.

Posted Image


View Postg1Nz0, on 01 May 2012 - 07:07 AM, said:


"I don't/cannot lose. I am not wrong. If I become victim of these in the form of reality, I quit. But more importantly, you suck."


#3 Achilles

Achilles

    Advanced Member

  • Hall of Fame
  • 27,144 posts
  • Gender: Male
  • Location: Florida

Posted 23 June 2010 - 05:22 PM

Me too


Posted Image



#4 Tenken

Tenken

    Advanced Member

  • Members
  • 6,560 posts
  • Gender: Male

Posted 24 June 2010 - 07:01 AM

I'll try to test it. Just depends when.

#5 JiB

JiB

    Seventy Times 7

  • Members
  • 22,376 posts
  • Gender: Male
  • Location: Harrisburg, PA /// Rochester, NY

Posted 24 June 2010 - 09:07 AM

ofc ill help

but idk if i can get the chat working, last 4 times i tried getting in there it said no gtfo u suck

Edited by JiB, 24 June 2010 - 09:07 AM.


#6 Bass

Bass

    Are you ready guys?

  • Members
  • 6,769 posts
  • Gender: Male

Posted 24 June 2010 - 10:29 AM

Honestly, I think anyone here who uses Windows should just download mIRC, it's free and pretty easy to use. I am on AIM if anyone needs help setting that up.

Edited by Forte, 24 June 2010 - 10:30 AM.


#7 Sage

Sage

    Green-Eyed Lookalike

  • Members
  • 13,001 posts
  • Gender: Male

Posted 25 June 2010 - 08:58 PM

I'll help test it.

Alas, poor Yorick.


#8 Bass

Bass

    Are you ready guys?

  • Members
  • 6,769 posts
  • Gender: Male

Posted 30 June 2010 - 04:39 AM

Alright, I am mostly done coding mafia for my bot now. We are just about ready to begin testing! Firstly though, I might as well inform you how it works. If you don't wish to gorge in the details yet, scroll down to the very end and at least read the disclaimer.



Getting Started:

As I already stated, you will need to join ETC's IRC Channel to use this bot. The easiest way is to simply click the "Chat" tab at the top of the forum. However, if that doesn't work for whatever reason, then you must manually join it with another IRC client. I offer these recommendations:
  • mIRC (Windows)
  • Colloquy (Mac OS X)
  • X-Chat (GNU / Linux)
Once you have chosen your client, install it (if you haven't already). I am not going to post a full guide on how to properly configure them because there are plenty of those to be found in a google search.
To access ETC's chatroom (or "channel"), connect to the Xerocreative Server (whose address is irc.xerocreative.com). Adjust your nick accordingly and register it if possible. Once connected, type "/join #etc" and you are there! ForteBot will be the name of the bot.


Starting a new Game:

To start a game, simply type "!mafia" while in the channel. If ForteBot is around and no other games are going on, he will begin to assemble a signups list. Then simply type "!join" into the channel to join the game. After a minute, the bot will determine what game to make based on the number of players who join:

  • < 5 players - This is an insufficient amount of players, so no game will be started. You will need to type !mafia again to attempt collecting signups again.
  • 5 players - 1 Vanilla Townie, 1 Mayor, 2 Mafia, 1 Inspector
  • 6 players - 1 Vanilla Townie, 1 Mayor, 2 Mafia, 1 Inspector, 1 Bodyguard
  • 7 players - 1 Vanilla Townie, 1 Mayor, 2 Mafia, 1 Inspector, 1 Bodyguard, 1 Hooker
  • 8 players - 1 Vanilla Townie, 1 Mayor, 2 Mafia, 1 Inspector, 1 Bodyguard, 1 Hooker, 1 Serial Killer
  • 9 players - 2 Vanilla Townies, 1 Mayor, 2 Mafia, 1 Inspector, 1 Bodyguard, 1 Hooker, 1 Serial Killer
  • 10 players - 3 Vanilla Townies, 1 Mayor, 2 Mafia, 1 Inspector, 1 Bodyguard, 1 Hooker, 1 Serial Killer
  • 11 players - 3 Vanilla Townies, 1 Mayor, 3 Mafia, 1 Inspector, 1 Bodyguard, 1 Hooker, 1 Serial Killer
And the pattern (starting from 9 players) repeats.

Explanation of Roles:

Vanilla Townie - Standard powerless role. Town aligned.
Mayor - Vanilla Townie with double vote. Town aligned.

Mafia - Mostly standard mafia goons. They are given their teammates when the game starts and can kill one other player at night by PMing ForteBot !kill USER". Mafia aligned obviously.
Inspector - Typical cop role. Gives the role name of your target at night by PMing ForteBot !inspect USER". Town aligned.
Bodyguard - Standard protector role. Protects a user from kills by PMing ForteBot "!protect USER". Town aligned.
Hooker - Standard roleblocker role. Prevents a user from completing their night action by PMing ForteBot "!grape user" yes, ignore the filter here and use your imagination. Note that targeting one mafia goon stops them all from successfully killing, regardless who sent the command. Town aligned.
Serial Killer - Wins if he is the only surviving player. Can kill at night by PMing ForteBot "!kill USER". Self aligned.

I will add more roles as more testing is completed.
Nights and Days:

When there are enough players, the bot will randomly assign everyone roles. If they have a night action, they may use the above commands to PM them to ForteBot. Nights last 60 seconds.

During the day, you may vote to lynch someone by typing "!vote USER" in the channel. After 90 seconds, the person with majority votes gets lynched. Note that if the majority is a tie, there will be no lynch.

I think you know the conditions to end the game, so I am not going to state that here.

Most other rules are standard, but this bot will not strictly enforce a no outside communication rule. That's up to you.

Disclaimer:


Because this bot is in the testing stages, I cannot guarantee that anything works as stated above as of this post. It is very well possible that the game may very well be unplayable. It's very difficult to fix or even detect some of these problems due to the nature of the testing, so I will need all the help I can get.

Thanks, and have fun!

Edited by Forte, 30 June 2010 - 08:38 PM.


#9 Sage

Sage

    Green-Eyed Lookalike

  • Members
  • 13,001 posts
  • Gender: Male

Posted 30 June 2010 - 04:54 AM

I'm still up for testing, and I might be able to help fix some of the problems if any occur, depending on what code this is written in.

Alas, poor Yorick.


#10 Krizz

Krizz

    The Terror of the Void

  • Administrators
  • 11,726 posts
  • Gender: Male
  • Location: Buffalo, New York

Posted 30 June 2010 - 06:09 AM

I am also still down for this. But 90 seconds for day time discussion doesn't seem like enough.

Posted Image


View Postg1Nz0, on 01 May 2012 - 07:07 AM, said:


"I don't/cannot lose. I am not wrong. If I become victim of these in the form of reality, I quit. But more importantly, you suck."


#11 Tenken

Tenken

    Advanced Member

  • Members
  • 6,560 posts
  • Gender: Male

Posted 30 June 2010 - 07:30 AM

I know IRC should be fast-paced since we all started at once. But I agree 90 seconds is pretty short.

I can only assume there won't even be enough time for outside convo. And the 90second limit/60second limit will be tought with higher count of players.

But I guess we'll see through testing.

#12 Sage

Sage

    Green-Eyed Lookalike

  • Members
  • 13,001 posts
  • Gender: Male

Posted 30 June 2010 - 08:01 AM

Something can always be programmed in to change the time of day/night depending on the # of players remaining, I think that would be fun.

Alas, poor Yorick.


#13 Bass

Bass

    Are you ready guys?

  • Members
  • 6,769 posts
  • Gender: Male

Posted 30 June 2010 - 05:19 PM

Well both smogon and somethingawful have IRC mafia bots, and the days are about 90 seconds long in them both AFAIK. Of course, I can easily make it 30-60 seconds longer if it really matters (It's literally 1 line of code).

Also Sage, the bot is written in Java using Jibble's Pircbot API:

http://www.jibble.or...cbot/index.html

Oh, and the bot is in the channel now, so let's start testing!

Edited by Forte, 30 June 2010 - 05:21 PM.


#14 Sage

Sage

    Green-Eyed Lookalike

  • Members
  • 13,001 posts
  • Gender: Male

Posted 30 June 2010 - 05:41 PM

Awesome, I know Java pretty well (although I've never looked at this Pircbot thing), so if you run into any problems then I'd be glad to try to help.

Alas, poor Yorick.


#15 Bass

Bass

    Are you ready guys?

  • Members
  • 6,769 posts
  • Gender: Male

Posted 30 June 2010 - 07:55 PM

Thank you Krizz, Yoy, and Sage for helping me run the bot's first complete game!

[22:24] <~Forte> !mafia
[22:24] <~ForteBot> A game of mafia has been started! We need at least 5 people in the next 60 seconds to join. To join, simply type !join
[22:24] <xSage> !join
[22:24] <~ForteBot> xSage has joined the game!
[22:24] <~Forte> !join
[22:24] <~ForteBot> Forte has joined the game!
[22:24] <Krizz> !join
[22:24] <~ForteBot> Krizz has joined the game!
[22:24] <Sage2> !join
[22:24] <~ForteBot> Sage2 has joined the game!
[22:25] <Yoy> one more i guess
[22:25] <Yoy> !join
[22:25] <~ForteBot> Yoy has joined the game!
[22:25] * Sage (~14651@XC-AC447966.dhcp.hckr.nc.charter.com) has joined #etc
[22:25] <Yoy> Not enough players!
[22:25] * Sage (~14651@XC-AC447966.dhcp.hckr.nc.charter.com) Quit (Quit: user exited)
[22:25] <~Forte> it is enough
[22:25] <Sage2> we have 5
[22:25] <~ForteBot> The game is is about to begin! Players: [xSage, Forte, Krizz, Sage2, Yoy]
[22:25] <~ForteBot> The roles will be: [Inspector, Mafia, Mafia, Vanilla Townie, Vanilla Townie]
[22:25] -ForteBot- You are: Mafia. At night you can kill other players by PMing me !kill <player>. You are allied with the Mafia.
[22:25] -ForteBot- Your team: [xSage, Forte]
[22:25] <~ForteBot> Night 0 has started! You have 60 seconds to PM me your night actions!
[22:25] <Krizz> Vanilla here
[22:26] <Yoy> inspector
[22:26] -ForteBot- You have chosen to kill Yoy
[22:26] -ForteBot- You have chosen to kill Yoy
[22:26] <xSage> xSage is mafia, Sage2 is vanilla
[22:26] <xSage> so we killed inspector I guess
[22:26] -ForteBot- You have successfully killed Inspector!
[22:26] <~ForteBot> Yoy (Inspector) was killed!
[22:26] <~ForteBot> Day 1 has started! You have 90 seconds to lynch someone. Type !vote USER to cast your vote!
[22:26] <~Forte> !vote Krizz
[22:26] <xSage> !vote Sage2
[22:26] <~ForteBot> xSage has voted to lynch Sage2
[22:27] <~ForteBot> Forte has voted to lynch Krizz
[22:27] <xSage> !vote Krizz
[22:27] <~ForteBot> xSage has voted to lynch Krizz
[22:27] <Krizz> !vote Krizz
[22:27] <~ForteBot> Krizz has voted to lynch Krizz
[22:27] <Sage2> !vote Krizz
[22:27] <~ForteBot> Sage2 has voted to lynch Krizz
[22:27] <Yoy> FoS
[22:27] <xSage> >_<
[22:27] <Yoy> ....

[22:27] <Yoy> FoS
[22:27] <xSage> >_<
[22:27] <Yoy> ....
[22:27] <xSage> 60 second nights
[22:28] <xSage> and people were complaining they're too short >_<
[22:28] <~Forte> yeah
[22:28] <~Forte> these are long
[22:28] <~ForteBot> Krizz (Vanilla Townie) was killed!
[22:28] <~ForteBot> Night 1 has started! You have 60 seconds to PM me your night actions!
[22:28] <xSage> wooo
[22:28] <~Forte> Yes!
[22:28] <Krizz> yeah now that I sit here and wait 90 seconds seems plenty long
[22:28] -ForteBot- You have chosen to kill Sage2
[22:28] <~Forte> ok Sage
[22:28] <~Forte> if this works
[22:28] <~Forte> it should say we win
[22:28] <xSage> killing Sage2
[22:28] <xSage> yeah
[22:28] <~Forte> then we are golden
[22:28] <~Forte> though
[22:29] <~Forte> i still need to test hooker and bodyguard
[22:29] <xSage> we can just make more clones
[22:29] <~Forte> hooker was tricky to code
[22:29] -ForteBot- You have successfully killed Vanilla Townie!
[22:29] <xSage> i bet
[22:29] <~ForteBot> Sage2 (Vanilla Townie) was killed!
[22:29] <~ForteBot> Game over! Mafia ([xSage, Forte]) wins!

While that was successful, there is still work to be done!

-I have made mayor a default role for now in order to give the town a fair chance in 5 man games.
-Hooker, Bodyguard, and Serial Killer still need to be tested. We need more players to join the test!
-Finally, the bot is only connected as long as my computer is on, so don't expect to see him during late night and early morning hours for now.

#16 Bass

Bass

    Are you ready guys?

  • Members
  • 6,769 posts
  • Gender: Male

Posted 04 July 2010 - 11:08 PM

Hate to double post but I am severely disappointed. Not one of you has shown up to help test the bot since its completion. I am not sure if you people forgot or are just too lazy to log on to IRC, (it's really not as hard to setup or use as some of you think). Really, if 10+ people are willing to play Quick Mafia on a forum, I don't see why the bot would be so much less popular.

#17 Sage

Sage

    Green-Eyed Lookalike

  • Members
  • 13,001 posts
  • Gender: Male

Posted 04 July 2010 - 11:13 PM

I've been popping in and out every once in a while, but there really hasn't been anyone but you on. I'd be glad to help you test any time, it just might be best if we scheduled something... otherwise nobody will be on at the same time.

Alas, poor Yorick.


#18 Bass

Bass

    Are you ready guys?

  • Members
  • 6,769 posts
  • Gender: Male

Posted 04 July 2010 - 11:20 PM

If it must come to that, then so be it.

#19 Sage

Sage

    Green-Eyed Lookalike

  • Members
  • 13,001 posts
  • Gender: Male

Posted 04 July 2010 - 11:23 PM

Yeah... sadly the chat isn't too active here. It really sucks.

Alas, poor Yorick.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Powered by Multacom Dedicated Servers