Here is a program that feels pain. It is a simulation of a 2-input logic gate that you train by reinforcement learning. It "feels" in the sense that it adjusts its behavior to avoid negative reinforcement from the user.
/* pain.cpp - A program that can feel pleasure and pain. The program simulates a programmable 2-input logic gate. You train it by reinforcement conditioning. You provide a pair of input bits (00, 01, 10, or 11). It will output a 0 or 1. If the output is correct, you "reward" it by entering "+". If it is wrong, you "punish" it by entering "-". You can program it this way to implement any 2-input logic function (AND, OR, XOR, NAND, etc). */ #include <iostream> #include <cstdlib> using namespace std; int main() { // probability of output 1 given input 00, 01, 10, 11 double wt[4]={0.5, 0.5, 0.5, 0.5}; while (1) { cout << "Please input 2 bits (00, 01, 10, 11): "; char b1, b2; cin >> b1 >> b2; int input = (b1-'0')*2+(b2-'0'); if (input >= 0 && input < 4) { int response = double(rand())/RAND_MAX < wt[input]; cout << "Output = " << response << ". Please enter + if right, - if wrong: "; char reinforcement; cin >> reinforcement; if (reinforcement == '+') cout << "aah! :-)\n"; else if (reinforcement == '-') cout << "ouch! :-(\n"; else continue; int adjustment = (reinforcement == '-') ^ response; if (adjustment == 0) wt[input] /= 2; else wt[input] = 1 - (1 - wt[input])/2; } } } --- Jiri Jelinek <[EMAIL PROTECTED]> wrote: > James, > > Frank Jackson (in "Epiphenomenal Qualia") defined qualia as > "...certain features of the bodily sensations especially, but also of > certain perceptual experiences, which no amount of purely physical > information includes.. :-) > > >If it walks like a human, talks like a human, then for all those > aspects it is a human > > If it feels like a human and if Frank is correct :-) then the system > may, under certain circumstances, want to modify given goals based on > preferences that could not be found in its memory (nor in CPU > registers etc.). So, with some assumptions, we might be able to write > some code for the feelPainTest procedure, but no idea for the actual > feelPain procedure. > > Jiri > > On 6/11/07, James Ratcliff <[EMAIL PROTECTED]> wrote: > > Two different responses to this type of arguement. > > > > Once you "simulate" something to the fact that we cant tell the difference > > between it in any way, then it IS that something for most all intents and > > purposes as far as the tests you have go. > > If it walks like a human, talks like a human, then for all those aspects > it > > is a human. > > > > Second, to say it CANNOT be programmed, you must define IT much more > > closely. For cutaneous pain and humans, it appears to me that we have > pain > > sensors, so if we are being pricked on the arm, the nerves there send the > > message to the brain, and the brain reacts to it there. > > > > We an recreate this fairly easily using VNA with some robotic touch > sensors, > > and saying that "past this threshhold" it becomes "painful" and can be > > damaging, and we will send a message to the CPU. > > > > If there is nothing "magical" about the pain sensation, then there is no > > reason we cant recreate it. > > > > James Ratcliff > -- Matt Mahoney, [EMAIL PROTECTED] ----- This list is sponsored by AGIRI: http://www.agiri.org/email To unsubscribe or change your options, please go to: http://v2.listbox.com/member/?member_id=231415&user_secret=e9e40a7e