Punishment chooser

This is the place for general discussions on fetishes, sexuality and anything else. What's on your mind right now?
Post Reply
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Punishment chooser

Post 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.
Attachments
punishments.zip
(14.44 KiB) Downloaded 404 times
Last edited by MistressAlexa on Thu Jun 16, 2011 9:14 am, edited 1 time in total.
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: Punishment chooser

Post 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).
User avatar
Haldirkd
Explorer At Heart
Explorer At Heart
Posts: 248
Joined: Sun Aug 13, 2006 12:33 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive
Location: Esbjerg, Denmark

Re: Punishment chooser

Post 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?
If you think you might like it, try it.
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: Punishment chooser

Post 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.
User avatar
Haldirkd
Explorer At Heart
Explorer At Heart
Posts: 248
Joined: Sun Aug 13, 2006 12:33 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive
Location: Esbjerg, Denmark

Re: Punishment chooser

Post by Haldirkd »

I did install python 2.7, that's where I get the errors :(

EDIT: got it to work, updated the configparser package!
Last edited by Haldirkd on Thu Jun 16, 2011 7:58 am, edited 1 time in total.
If you think you might like it, try it.
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: Punishment chooser

Post by MistressAlexa »

Hmmm... Could you please post the error outputs?
User avatar
Haldirkd
Explorer At Heart
Explorer At Heart
Posts: 248
Joined: Sun Aug 13, 2006 12:33 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive
Location: Esbjerg, Denmark

Re: Punishment chooser

Post 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
If you think you might like it, try it.
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: Punishment chooser

Post by MistressAlexa »

Thank you. I will probably not be updating it, however, since it is just a tech demo.
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: Punishment chooser

Post by MistressAlexa »

Oh, I see why you were getting that error. I have fixed it now; it should be fine for future downloads.
User avatar
neloangelo1227
Explorer
Explorer
Posts: 93
Joined: Sun Feb 17, 2008 9:46 pm
Location: USA

Re: Punishment chooser

Post by neloangelo1227 »

This is really cool!

Have you considered putting the code up on github.com so people can submit pull requests?
"Submission, like apology, is often mistaken for a sign of weakness."
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: Punishment chooser

Post 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. ;-)
jamesf
Curious Newbie
Curious Newbie
Posts: 1
Joined: Sun Jun 19, 2011 11:34 am

Re: Punishment chooser

Post 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
Kenneth
Explorer At Heart
Explorer At Heart
Posts: 109
Joined: Mon Apr 02, 2007 9:04 am
I am a: Switch

Re: Punishment chooser

Post 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 ;-)
---

About CyberMistress, 2005-2011
The CM software is my intellectual property and no one is allowed to distribute it. Use it at your own risk, no support whatsoever. I do not mind the sharing of content which was created for it by 3rd party. My content however is not to be shared.
MistressAlexa
Explorer
Explorer
Posts: 20
Joined: Sun Mar 06, 2011 12:36 am

Re: Punishment chooser

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests