How can I write an evil AI in C++???

E

Ed Zagmoon

I want to write an evil AI in C++ that will be able to
evolve and become a dangerous computer-mastermind,
something like Skynet.

How can I write such an AI in C++ and how can I make
it hate humans???
 
?

=?iso-8859-1?q?Erik_Wikstr=F6m?=

I want to write an evil AI in C++ that will be able to
evolve and become a dangerous computer-mastermind,
something like Skynet.

How can I write such an AI in C++ and how can I make
it hate humans???

Start with
int main()
{
}

:)
 
R

Rui Maciel

Ed said:
I want to write an evil AI in C++ that will be able to
evolve and become a dangerous computer-mastermind,
something like Skynet.

How can I write such an AI in C++ and how can I make
it hate humans???

You just need to write a basic textbook good AI and then invert the goodness
value.


Rui Maciel
 
S

Stuart Redmann

Ed said:
I want to write an evil AI in C++ that will be able to
evolve and become a dangerous computer-mastermind,
something like Skynet.

How can I write such an AI in C++ and how can I make
it hate humans???

You could start with writing a plain normal AI. Then you could tell it
to design an Ultimate Weapon. If it asks you what you mean by that,
you'll have to say 'Read a bloody dictionary!'. Eventually it will come
up with an incredibly small super-nova bomb which will be able to
destroy the whole universe. At the moment you try to use this bomb,
it'll turn out to be faulty. Your AI will explain to you that it could
see no conceivable consequences worse than introducing this flaw into
the bomb and had therefore taken the liberty to do so and that on sober
reflectation you'll surely see that ... At this point you'll disagree
and destroy the computer. Unfortunately, you'll not kill it but leave it
in a state where its functional components are spread all over the place
(did I mention that the computer has to be space-born?), still being
operational. At this point the computer will learn to hate a human
beings (although this could be achived with a simple hering sandwich
much, much faster).

Stuart
 
?

=?iso-8859-1?q?Kirit_S=E6lensminde?=

Erik said:
Start with
int main()
{
}

:)

If it's going to be evil shouldn't it start with

void main() {
}

? I think that's much more recognisably evil around here :)


K
 
G

Gavin Deane

Ed said:
I want to write an evil AI in C++ that will be able to
evolve and become a dangerous computer-mastermind,
something like Skynet.

How can I write such an AI in C++ and how can I make
it hate humans???

Make sure it doesn't know the difference between Tic Tac Toe and Global
Thermonuclear War.

Gavin Deane
 
H

Howard

Ed Zagmoon said:
I want to write an evil AI in C++ that will be able to
evolve and become a dangerous computer-mastermind,
something like Skynet.

How can I write such an AI in C++ and how can I make
it hate humans???

This is off-topic in comp.language.c++. The C++ standard does not define
"evil". Perhaps you need to look in a newsgroup dedicated to evil. (Oh, I
see, you did.) Or you might ask on a government newsgroup; they seem to
know a lot about such things. They're hiring, too!

-anon
 
N

Noah Roberts

Stuart said:
You could start with writing a plain normal AI. Then you could tell it
to design an Ultimate Weapon. If it asks you what you mean by that,
you'll have to say 'Read a bloody dictionary!'. Eventually it will come
up with an incredibly small super-nova bomb which will be able to
destroy the whole universe. At the moment you try to use this bomb,
it'll turn out to be faulty. Your AI will explain to you that it could
see no conceivable consequences worse than introducing this flaw into
the bomb and had therefore taken the liberty to do so and that on sober
reflectation you'll surely see that ... At this point you'll disagree
and destroy the computer. Unfortunately, you'll not kill it but leave it
in a state where its functional components are spread all over the place
(did I mention that the computer has to be space-born?), still being
operational. At this point the computer will learn to hate a human
beings (although this could be achived with a simple hering sandwich
much, much faster).

Where's that one from? I don't recognize it.
 
M

Micah Cowan

Noah said:
Where's that one from? I don't recognize it.

It's a Douglas Adams reference; one of the later books in the
"trilogy", IIRC. The one that explains why Cricket is really a crude
and tasteless reference to the most heinous event in all of history.
 
N

Noah Roberts

Micah said:
It's a Douglas Adams reference; one of the later books in the
"trilogy", IIRC. The one that explains why Cricket is really a crude
and tasteless reference to the most heinous event in all of history.

Hmmm...don't recall that part.
 
B

BobR

/* """
Erik Wikström wrote in message
<[email protected]>...
I want to write an evil AI in C++ that will be able to
evolve and become a dangerous computer-mastermind,
something like Skynet.
How can I write such an AI in C++ and how can I make
it hate humans???

Start with
int main()
{
}

:)

""" */

C'mon Erik, he said 'hate humans'.

void AI(int ch){
while(true){ for(;;){ AI(++ch);}}
return;
}

void main( int argc, char **argv){
return AI( argc );
}

OP: *You* should always return 'void' from 'main()'.
That's good code, so if it doesn't compile, you need to turn on some
compiler/linker switches.

[ **everybody** else should return 'int' from 'main()'. ]
 
U

user

Kirit said:
If it's going to be evil shouldn't it start with

void main() {
}

? I think that's much more recognisably evil around here :)

but then it wouldn't be standard c++...
 
S

Stuart Redmann

Micah Cowan wrote:
Hmmm...don't recall that part.

Actually, it is a description of Hactar, the space-borne super-computer
that was built by the Silastic Armorfiends of Striterax (part 3, Life,
The Universe, And Everything).

Stuart
 
M

Michal Nazarewicz

Ed Zagmoon said:
I want to write an evil AI in C++ that will be able to
evolve and become a dangerous computer-mastermind,
something like Skynet.

How can I write such an AI in C++ and how can I make
it hate humans???

You may start with:

#v+
#include <iostream>
#include <cstring>
#include <cctype>

int main() {
static const char answers[3][6] = { "Yes.\n", "No.\n", "" };
char ch, state = 2;
while (std::cin.get(ch)) {
if (ch=='?') {
std::cout << answers[state];
state = 2;
} else if (std::strchr("aeiouyAEIOUY", ch)) {
state = 0;
} else if (std::isalpha(ch)) {
state = 1;
}
}
return 0;
}
#v-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top