<catepillar>
so there's 3 different ways to do this
<catepillar>
`set :prefix, ...` would work on plugins
<catepillar>
`c.plugins.prefix = ...` would affect all plugins
<catepillar>
it kinda depends on the setup of your bot in particular
<Rickmasta>
I don't have a plugin-based bot.
<Rickmasta>
A single ruby file.
<catepillar>
so you are doing a bunch of `match /.../`? with no prefix?
<Rickmasta>
I'm not too familiar with what you mean.
<Rickmasta>
I do have
<Rickmasta>
things like "on :message, /^.+Choose a color Rig/ do |m|"
<catepillar>
ok, that's easy enough, your matcher is a /./
<catepillar>
i would assume
<Rickmasta>
Is there anyway that I can make it so that every :message event removes the colors before
<catepillar>
im testing htis out, make sure i get you something that works right
<Rickmasta>
Sure
<catepillar>
i dunno about that in particular, dominikh might know
<catepillar>
`/(?:[\x02\x1F\x0F\x16]\x03(?:\d\d?(?:,\d\d?)?))?.+Choose a color Rig/`
<catepillar>
seems to be getting it
<catepillar>
use everything between the `` (don't include the ticks)
<catepillar>
you could probably remove the .+ now too, since you probably just want to match something like `Choose a color` and not asdf.Choose a color
<catepillar>
alright, my lunch break is over now, but i can check in here if you have any more questions
<Rickmasta>
Sweet. Thank you catepillar!
<catepillar>
np
<Rickmasta>
Actually, doesn't seem to ork catepillar
<Rickmasta>
This is an example message
<Rickmasta>
:\u0002\u00033U\u000312N\u000313O\u000308!\u0002\u0003 Card in play: \u00030,04 Red 2 \u0003
<catepillar>
you might need to swap out all the \x with \u00
<catepillar>
i forget exactly how ruby handles unicode in strings
xeviox|afk is now known as xeviox
<Rickmasta>
I can't get it.
<Rickmasta>
:/
<catepillar>
i need to see some sample code now...
<dominikh>
you could implement stripping of colors in the core of cinch ;)
<Rickmasta>
Wouldn't know how. :(
<Rickmasta>
That was one of my first thoughts, though.
<dominikh>
certainly saner than writing such regexps
<Rickmasta>
Are you the author of Cinch, dominikh?
<dominikh>
yes
<Rickmasta>
Maybe we can write it "together" and it can be implemented? ;)
<dominikh>
I'm not actively working on Cinch anymore, I spend my time on other things ;)
<Rickmasta>
Ah
<dominikh>
it should be rather straightforward though
<Rickmasta>
Is it possible if you can lead me in the right direction and I find my way from there?
<dominikh>
meh, I'll see about implementing it
<Rickmasta>
lol :)
<Rickmasta>
I wrote this UNO playing bot. I had it working, then once I stuck it in the real channel, I didn't even realize that the colors would make such a big deal.
<catepillar>
so are you trying to parse your own colors?
<Rickmasta>
Not my uno channel.
<Rickmasta>
I'm just making a bot to play uno to practice my ruby
<dominikh>
(and of course a fair dose of cheating :P)
<Rickmasta>
lol nah :P
<Rickmasta>
My bot is stupid!
<Rickmasta>
Did't realize how hard it'll be to make it "smart"
<Rickmasta>
plus I have zero knowledge of any AI oriented programming.
<catepillar>
eh, im pretty sure playing uno is considered pretty trivial
<dominikh>
depends if you want to predict your opponent's moves or not
<catepillar>
this is a fair statement, and humans do tend to try and predict
<Rickmasta>
Yeah, so I was going to do things like have the bot keep track of what cards they possibly don't have.
<Rickmasta>
But I want to get it to play first. :P
<Rickmasta>
they as in the other players. Like if the drew when a Blue 9 was out, then they don't have any Blues or 9s.
<catepillar>
seems to have been a couple of papers written on optimal uno strategies
<catepillar>
most of them have to do with keeping track of who played what and when
<catepillar>
then using statistics to figure who might have what
<catepillar>
from a cursory glance
<dominikh>
try poker instead ;)
<catepillar>
poker is about the same :P
<Rickmasta>
I'll master UNO then create a poker game.
<catepillar>
probably easier cause of hte smaller deck
<Rickmasta>
You guys can play against it. ;)
<dominikh>
catepillar: a lot more to predict though. bluffing behaviour, aggressiveness etc
<dominikh>
catepillar: i.e. it crosses single hand boundaries
<catepillar>
dominikh: yea, if you wanna get that complicated
<dominikh>
catepillar: well of course, I want to cheat on pokerstars and win money! ;)
<catepillar>
bots that play the straight odds tend to be relatively successful anyways
<catepillar>
of course, in poker terms, they are considered "conservative"
<dominikh>
not that successful if they can't get anyone to commit though
<dominikh>
"oh look, the bot's playing… time to fold" :P
<catepillar>
that's the problem with conservative play, yes
<catepillar>
but if you ahve 4 bots in a room of 5 playing hte same conservative method, where they all communicate, then you have all 4 go to the flop (if texas hold em) then best hand plays out
<catepillar>
gonna have a rougly 80% win rate like that ;)
<dominikh>
and of course you'll get banned ;)
<catepillar>
what? banned? how?
<catepillar>
i have 4 different IP's from 5 different countries!
<dominikh>
yeah, it's not exactly hard to spot a) strictly mathematical play b) players that communicate
<catepillar>
actually, just need to cycle IP's enough that it's very difficult to track, and use lots of different accounts
<dominikh>
be it bots or not; they equally hunt real people who play together at the same table to cheat
<dominikh>
lots of different accounts will be difficult to cash out
<catepillar>
ahh, so super smart bot is much better
<dominikh>
how many bank accounts/credit cards do you have? ;)
<catepillar>
eh, 5 bank accounts today
<catepillar>
20 tomorrow
<catepillar>
anyways, i need to get work done
<dominikh>
and 80 the day after tomorrow? I hope you can keep that growth up :P
<catepillar>
we can continue this talk when i get off work
<catepillar>
:)
<dominikh>
(said the administrator of a big bank)
<catepillar>
lol, you are a bank admin?
<dominikh>
no, I was implying that you are
<dominikh>
I'm a student whose only relationship with banks consists of debt :P
<catepillar>
haha, i just graduated in may
<dominikh>
hah, congrats
<catepillar>
software developers (and not for banks)
<catepillar>
*developer
<dominikh>
Rickmasta: almost done
<Rickmasta>
Sweeet!
<Rickmasta>
My method was failing
<Rickmasta>
I was trying to create a removecolor method
<dominikh>
in essence that's the same thing I did. just in the right place
Space has joined #cinch
<dominikh>
now I only need to figure out how to send colours with my IRC client :P
<dominikh>
well then, seems to work
<dominikh>
Rickmasta: you'll need to build cinch from git
<Rickmasta>
Alright, now I must learn how to do that.