Page 1 of 1

Punishment chooser

Posted: Thu Jun 16, 2011 5:00 am
by MistressAlexa
Hello,

I have a little technical demo for y'all. I wrote a little program that chooses the most appropriate punishments for you based on your preferences. For now, there are only 24 punishments (taken from CyberMistress Donatella), but more can be added easily. I may implement this into the CyberMistress successor I'm working on.

To use this you will need Python installed. Simply extract the two files in the .zip archive (punishments.py and punishments.txt) to the same folder. Open punishments.py with a text editor and set your preferences (instructions are inside). Save the file, and run it in Python. It will then show the most suitable punishments for you, in descending order.
Spoiler: show
For any who are curious, the way this program works is very simple. All it does is compare the user's preference for each category of punishment to the categories each punishment is in. It does this by finding the Euclidean distance (modified Pythagorean Theorem) between the user's preference and the punishment, "plotted" on an n-th dimensional Cartesian plane, where n is the number of categories the punishment is in.
Please tell me how this works for you. Is it accurate? Also, if you need any help with setup please ask.
Thank you.

EDIT: Fixed a bug with the ConfigParser module. It should now work.

Re: Punishment chooser

Posted: Thu Jun 16, 2011 5:26 am
by MistressAlexa
Oh, by the way, I would be careful with the punishments that require hanging bottles of water from your testicles. This could be dangerous, especially considering their mass (~2kg for a 2L bottle of water).

Re: Punishment chooser

Posted: Thu Jun 16, 2011 7:19 am
by Haldirkd
I have been trying to get it to work, but can't seem to get it, either there is some errors, or I'm just to dumb to get it done.

I have so far got two errors, the first being that the rawconfigparser doesn't seem to include a read_file function, but rather only a read funtion.

If I fix that, I get an error saying items() takes exactly 2 arguments (1 given).

any thoughts?

Re: Punishment chooser

Posted: Thu Jun 16, 2011 7:29 am
by MistressAlexa
Oh yes, I forgot to mention. You need Python 2.7, not 3.x. I'm guessing that is the source of the problem.

Uninstalling and installing Python 2.7 should fix it.

Re: Punishment chooser

Posted: Thu Jun 16, 2011 7:37 am
by Haldirkd
I did install python 2.7, that's where I get the errors :(

EDIT: got it to work, updated the configparser package!

Re: Punishment chooser

Posted: Thu Jun 16, 2011 7:56 am
by MistressAlexa
Hmmm... Could you please post the error outputs?

Re: Punishment chooser

Posted: Thu Jun 16, 2011 8:02 am
by Haldirkd
It's a nice and simple way to choose a punishment, however I think that it could benefit a lot from small improvements, perhaps only diplay one punishment, and of course just having more added.

I have found the need for very fine specifications of the prefs. otherwise there will be a lot of them very close together.

But overall a nice little program! :-D

Re: Punishment chooser

Posted: Thu Jun 16, 2011 8:06 am
by MistressAlexa
Thank you. I will probably not be updating it, however, since it is just a tech demo.

Re: Punishment chooser

Posted: Thu Jun 16, 2011 9:15 am
by MistressAlexa
Oh, I see why you were getting that error. I have fixed it now; it should be fine for future downloads.

Re: Punishment chooser

Posted: Sat Jun 18, 2011 4:41 am
by neloangelo1227
This is really cool!

Have you considered putting the code up on github.com so people can submit pull requests?

Re: Punishment chooser

Posted: Sat Jun 18, 2011 7:38 am
by MistressAlexa
Hmmm, maybe I will.

It's very simple now, but if someone wants to improve it that would be great.

I'm thinking an interesting idea would be to automatically detect preferences using neural networks. This would probably require the slave to rate their "enjoyment" of several punishments beforehand, as well as providing periodic feedback.

Artificial intelligence has some really interesting applications here. ;-)

Re: Punishment chooser

Posted: Sun Jun 19, 2011 11:35 am
by jamesf
Running this on Mac OS X, receive this error:

Code: Select all

Traceback (most recent call last):  File "punishments.py", line 2, in <module>    import configparser  File "/punishments/configparser.py", line 131, in <module>    from ordereddict import OrderedDict as _default_dictImportError: No module named ordereddict

Re: Punishment chooser

Posted: Sun Jun 19, 2011 3:42 pm
by Kenneth
Hm, this could be fun. MistressAlexa: is the entire successor going to be in Python? I was experimenting with it last week and looking to learn it. This could actually be a very fun way ;-)

Re: Punishment chooser

Posted: Mon Jun 20, 2011 12:21 am
by MistressAlexa
jamesf wrote:Running this on Mac OS X, receive this error:

Code: Select all

Traceback (most recent call last):  File "punishments.py", line 2, in <module>    import configparser  File "/punishments/configparser.py", line 131, in <module>    from ordereddict import OrderedDict as _default_dictImportError: No module named ordereddict
What version of Python are you using?
Kenneth wrote:Hm, this could be fun. MistressAlexa: is the entire successor going to be in Python? I was experimenting with it last week and looking to learn it. This could actually be a very fun way ;-)
Yes, I love Python. It's an incredible language.

I was thinking about the GUI implementation, and I think I'm not going to do it with wxWidgets. Instead, I'm working on a CGI implementation, so it would run in the browser. The advantage of this is that it can be run locally as well as on websites.