473,386 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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???

Dec 14 '06 #1
18 2742
On Dec 14, 10:13 am, "Ed Zagmoon" <spartan_i...@yahoo.comwrote:
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()
{
}

:-)

--
Erik Wikström

Dec 14 '06 #2
Ed Zagmoon wrote:
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

Dec 14 '06 #3

Erik Wikström wrote:
On Dec 14, 10:13 am, "Ed Zagmoon" <spartan_i...@yahoo.comwrote:
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()
{
}

:-)
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

Dec 14 '06 #4

Ed Zagmoon wrote:
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

Dec 14 '06 #5
Ed Zagmoon wrote:
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
--
Running Kubuntu 6.10 with KDE 3.5.5 and proud of it.
jabber:ru********@jabber.org
Dec 14 '06 #6
On 14 Dec 2006 01:13:22 -0800, "Ed Zagmoon" <sp**********@yahoo.com>
wrote:
>and how can I make it hate humans???
Play it Barry Manilow records?

rossum

Dec 14 '06 #7
rossum wrote:
On 14 Dec 2006 01:13:22 -0800, "Ed Zagmoon" <sp**********@yahoo.com>
wrote:
>and how can I make it hate humans???
Play it Barry Manilow records?
No, play it Celine Dion (that bloody "Titanic" song) and Britney Spears.
Dec 14 '06 #8

"Ed Zagmoon" <sp**********@yahoo.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
>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

Dec 14 '06 #9

Stuart Redmann wrote:
Ed Zagmoon wrote:
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).
Where's that one from? I don't recognize it.

Dec 14 '06 #10

Noah Roberts wrote:
Stuart Redmann wrote:
Ed Zagmoon wrote:
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).

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.

Dec 14 '06 #11

Micah Cowan wrote:
Noah Roberts wrote:
Stuart Redmann wrote:
Ed Zagmoon wrote:
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).
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.
Hmmm...don't recall that part.

Dec 14 '06 #12
On Thu, 14 Dec 2006 15:54:45 GMT, "Howard" <al*****@hotmail.com>
wrote:
>
"Ed Zagmoon" <sp**********@yahoo.comwrote in message
news:11**********************@f1g2000cwa.googlegr oups.com...
>>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
The standard does not, but the FAQ for this group does, so this is
presumably on topic here:
http://www.parashift.com/c++-faq-lit....html#faq-29.8

rossum

Dec 14 '06 #13
/* """
Erik Wikström wrote in message
<11**********************@16g2000cwy.googlegroups. com>...
On Dec 14, 10:13 am, "Ed Zagmoon" <spartan_i...@yahoo.comwrote:
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()'. ]
--
Bob R
POVrookie
Dec 14 '06 #14
Kirit Sælensminde wrote:
>
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++...
Dec 14 '06 #15
Noah Roberts wrote:
>>>>Ed Zagmoon wrote:

>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???
>>>Stuart Redmann wrote:

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.
>>Noah Roberts wrote:

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

Dec 15 '06 #16
"Ed Zagmoon" <sp**********@yahoo.comwrites:
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-
--
Best regards, _ _
.o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +--<mina86*tlen.pl>---<jid:mina86*chrome.pl>--ooO--(_)--Ooo--
Dec 15 '06 #17
it is impressive everyone loves an off-topic discussion

you need to get laid :-)

Dec 15 '06 #18
"Diego Martins" <jo********@gmail.comwrites:
it is impressive everyone loves an off-topic discussion
Hey, it wasn't me who first started answering. ;)
you need to get laid :-)
http://img465.imageshack.us/img465/4579/unixnerdyd4.jpg :P

--
Best regards, _ _
.o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +--<mina86*tlen.pl>---<jid:mina86*chrome.pl>--ooO--(_)--Ooo--
Dec 16 '06 #19

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: janek | last post by:
Hello all! My question: How to write (in Builder C++) 10^(-b*z) cause i have no idea :( Thanks for any help.. johnnyB
2
by: Russell Reagan | last post by:
In a newer version of a chess program I am writing, I have created classes that are (more or less) drop in replacements for things that used to be plain old integer or enumerated variables (colors,...
14
by: rogerclive | last post by:
Perhaps, there is no bigger sleazy company in the entire Maple Republic ( Canada ) than Matrox Graphics Inc. I paid $100+ through my nose circa 1999 for Matrox Millenium II and Mystique. It...
6
by: Brian Raab | last post by:
I must warn you, evil script-kiddies write evil programs to flood the usenet with stupid messages in C.They probably write worms and virus programs, too. So tell the daddies of the...
1
by: Swami Tota Ram Shankar | last post by:
"Bob Weigel" <dontuwish@nothing.net> wrote in message > > While George Bush, is the epitome of evil, racism, and uncompassionate > > conservatism, Kerry is either deluded, very deluded, or...
24
by: Larry | last post by:
Hi there: I have seen numerous postings about eval() and its evils on this forum. However, one of our developers is using it in the following way, which seems like a great use of it. Page...
21
by: Raj | last post by:
Hi, We just executed a project with Python using TG. The feedback was to use more python like programming rather than C style code executed in Python. The feedback is from a Python purist and...
19
by: mohammaditraders | last post by:
a program which consists of a class named Student, the class should consists of three data members Name, Ob_marks, Total_marks and two member functions Cal_percentage() which calculate the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.