Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   [Contest] Create the Ultimate AI Baddie! (https://forums.graalonline.com/forums/showthread.php?t=23494)

galen 02-10-2002 02:33 PM

[Contest] Create the Ultimate AI Baddie!
 
I've been waiting for someone to create a make-shift AI since Oct '98 and as of yet I've been disappointed.

So here's your big chance! Be the first to create this analytical attacking NPC and you'll be famous through out Graal.

I am offering a reward of up to 2000g*. 1000g for a script that works for an NPC-Control'ed server and 1000g for one that works standalone. If an entry contains code that will run flawlessly in both environments then all 2000g is rewarded.

If any of the below points are not possible with the present GScript, then this contest will run it is possible and someone completes the task.

--------------------------------------------------------------------------
The Analytical Attacker:

- an NPC player sprite
- 3 modes: wander, hunt/attack, and retreat/heal
- hunts player down to attack with sword, bomb, or arrow
- avoids sword, bomb, and arrow player attacks
- can pick up player bombs to throw back at player
- if low on health, will retreat to heal
- if the opportunity exists, reflect arrows to hit player
- able to pickup and throw other nearby throw able objects
--------------------------------------------------------------------------

All qualifying entries will be made public for all to use.

* amount rewarded will depend solely on script quality and how well the NPC holds to the above description

Faheria_GP2 02-10-2002 02:38 PM

it's not like any serious scripters play on the crap known g2k1

upgrade us an account or something, then I'll consider

galen 02-10-2002 02:53 PM

If I don't get any, "this isn't possible" posts, I will consider uping the ante or offer substitute prizes.

Faheria_GP2 02-10-2002 02:59 PM

I want classic monies :(

galen 02-10-2002 03:16 PM

Quote:

Originally posted by Faheria_GP2
I want classic monies :(
since this script would be benifical to *all* servers, I'm sure I can arrange it.

nyghtGT 02-10-2002 04:05 PM

Quote:

Originally posted by galen


since this script would be benifical to *all* servers, I'm sure I can arrange it.

Thats no fun though ...
The purpose for playerworlds is diversity, not to get off one to go play on the other ones that have almost the exact same content ...

nyghtGT 02-10-2002 04:12 PM

Quote:

Originally posted by Kaimetsu


Not non-P2P servers. And the problem here is really that not many have access to an NPC Server with which they can test their work.

Thats agreeable ...
I'm sure though some server staff person would let them test something out ... I would if I still worked on a pay server ...

Faheria_LAT1 02-10-2002 04:35 PM

If you need to test something and you dont have access to an npcs server, you can contact me and ill add the npcs to the database and let you test it online :p

btedji 02-11-2002 03:50 AM

I guess I could give a try what the heck

zell12 02-11-2002 03:56 AM

That would take forever... What bout Shadow Knight? He is good, im saying that cause Kaimustu never helps to script on non-p2p

btedji 02-11-2002 04:24 AM

I can only script in non-p2p because I have no way to learn p2p scripting as it doesnt work offline

Tyhm 02-11-2002 06:56 AM

Re: [Contest] Create the Ultimate AI Baddie!
 
Quote:

Originally posted by galen

--------------------------------------------------------------------------
The Analytical Attacker:

- an NPC player sprite
- 3 modes: wander, hunt/attack, and retreat/heal
- hunts player down to attack with sword, bomb, or arrow
- avoids sword, bomb, and arrow player attacks
- can pick up player bombs to throw back at player
- if low on health, will retreat to heal
- if the opportunity exists, reflect arrows to hit player
- able to pickup and throw other nearby throw able objects
--------------------------------------------------------------------------

Won't work with throwable NPC objects...
bomb detection counts bombs in the air...
otherwise, several such examples exist on Classic in rudementary forms...

zell12 02-11-2002 07:11 AM

o.O mhmm

Lomgren 02-11-2002 09:32 AM

sounds interesting, I found a great example of baddy AI on Zorgonline, when it was still up. The baddy was made by ace2896, don't know who that is, and it performs all the requirements quite well, except for pickin up/throwing tiled objects. If you want, I could post it for others to see it. Or you could actually contact the maker, ace2896 ...

kyle0654 02-11-2002 10:40 AM

Hmm...possible, and not all too hard. Offer a reliable host for the DServer and I might consider entering.

adam 02-11-2002 11:01 AM

Re: [Contest] Create the Ultimate AI Baddie!
 
Quote:

Originally posted by galen

--------------------------------------------------------------------------
The Analytical Attacker:

- an NPC player sprite
- 3 modes: wander, hunt/attack, and retreat/heal
- hunts player down to attack with sword, bomb, or arrow
- avoids sword, bomb, and arrow player attacks
- can pick up player bombs to throw back at player
- if low on health, will retreat to heal
- if the opportunity exists, reflect arrows to hit player
- able to pickup and throw other nearby throw able objects
--------------------------------------------------------------------------

- must be able to go find the player even if he retreats into a maze type enviornment. =P

galen 02-11-2002 12:16 PM

Tyhm wrote:
Quote:

otherwise, several such examples exist on Classic in rudementary forms...
yes, rudementary. I have seem them in the past, I wasn't very impressed.


adam wrote:
Quote:

- must be able to go find the player even if he retreats into a maze type enviornment. =P
As long as functions can pass variables like any "normal" language, that would be easy via recursion.

Androk2k1 02-11-2002 08:25 PM

ace2896 is one of the first scripters who actually made really good scripts... he made this buddy he also made 2 Tutorials on GScripting and I think he wors for nW but i am not sure... he's an oldbie and I think he quit... unlss he works for NW...

Saga2001 02-12-2002 12:19 AM

Quote:

Originally posted by Lomgren
sounds interesting, I found a great example of baddy AI on Zorgonline, when it was still up. The baddy was made by ace2896, don't know who that is, and it performs all the requirements quite well, except for pickin up/throwing tiled objects. If you want, I could post it for others to see it. Or you could actually contact the maker, ace2896 ...
Everyones seen that.

Quote:

Originally posted by galen

The Analytical Attacker:

I believe it is all possible (well most as tyhm pointed out), and I would be happy to do it, however I would not wish for a reward. Also I think that there are some things bad about this, which the main one being that on non-p2p servers it would not be very good at all as it cannot switch levels, so yes it would be for all servers to have and use, but it would be useless for many. Still it sounds fun, I'll make it.

Admins 02-12-2002 01:17 AM

Everything that can be done with recursion can also
be done iterative on a single array :)

But a maze algorithm shouldn't be used,
it would make the script too slow and unrealistic.
The easier way to hunt the player is to
follow the last known position of the player and
then check again if the player can be seen.

TDO2000 02-12-2002 01:23 AM

The script for a nearly real acting baddy would be too much for graal... couldn't really be used online (lagg)

neomaximus2k 02-12-2002 04:06 AM

Well
 
Well after waiting for a month to get my forum account accepted it has now been accepted,

I have created many badies in my time, but what you are asking, it isn't impossible but it is highly improable that it can be made with the current version of graal, i may be wrong

galen 02-12-2002 08:48 AM

1 Attachment(s)
Quote:

Originally posted by Stefan
Everything that can be done with recursion can also
be done iterative on a single array :)

I wasn't thinking right when I said resuction. I ment stacks. I've attacked a lame-o(tm) maze runner progy I wrote in high school (source and binary included) as an example of stack usage.

Tyhm 02-12-2002 12:06 PM

I'm getting three advanced-CSCI credits for writing a robot navigator program. I could probably make a mazerunner if I ever had that kind of time. Not a difficult algorythm: scan the board, put waypoints outside every corner, search waypoint-to-waypoint in straight lines (it's doable in a grid world like Graal) until you can reach the player without going through any walls, then proceed along that route, scanning for the player along the way and breaking pursuit if it comes in range...not all that hard.

jeff335 02-12-2002 12:19 PM

*sets to work on mazerunner script, may improve it to a baddie AI while at it*

btedji 02-13-2002 07:07 AM

Quote:

Originally posted by Kaimetsu
The A* algorithm is pretty easy to implement in Graal. The only potentially difficult part is the generation of waypoints.
Couldnt you use string arrays for that, like addstring and remove string??

btedji 02-13-2002 08:24 PM

If you were to use the setarray command on a existing array would it erase all the existing variables in that array?

Spanko 02-13-2002 09:40 PM

Quote:

Originally posted by TDO2000
The script for a nearly real acting baddy would be too much for graal... couldn't really be used online (lagg)
Depends really, on a 450 MHZ computer Graal Script can run a loop of the length of around 1500 without any slowdown, servers are usually pretty high-end computers, so they should be able to handle it; just as long as the whole server isn't filled with tons of those baddies.

BocoC 02-13-2002 10:40 PM

Doesn't sound too hard. Might need a little planning. But:
Quote:

if the opportunity exists, reflect arrows to hit player
Normal players can't even do that!

TDK_RC6 02-13-2002 11:14 PM

Quote:

Originally posted by Stefan
Everything that can be done with recursion can also
be done iterative on a single array :)

But a maze algorithm shouldn't be used,
it would make the script too slow and unrealistic.
The easier way to hunt the player is to
follow the last known position of the player and
then check again if the player can be seen.

knots??

how would that be saved, serverside??

Saga2001 02-14-2002 12:10 AM

Quote:

Originally posted by Stefan
Everything that can be done with recursion can also be done iterative on a single array :)
I'm with that.

Quote:

Originally posted by Kaimetsu
Nope. Only if the array got smaller and they fell off the end or something.
LoL what expression, fell off the end. Yeah, i don't know why you would use string arrays...is there a push or pop command for regular arrays on graal? Hmmmmm...
NPC Code:

this.end = pop(arrayname);


Mmmmmm...
I guess you could do it other ways...but that would be more fun.
There should be multidementional arrays too, not that we would really use them 24/7 but could come in handy sometimes.

Quote:

Originally posted by TDK_RC6

knots??

how would that be saved, serverside??

I think so. Minimize your signature, its killing me...:(

adam 02-14-2002 04:15 AM

All this over a little hint from me blah. haha. I know it is fully possible to make a maze guy. Kaimetsu made a really nice one.


But stefan has a great idea too :) last known position.

add in last known heading and walla. try it.


it would be more realistic following.

The AI would goto the players last known postion and look around.

if the player retreated into the maze the AI would have to realize the player could have only gone one direction.... into the maze.
He would then head into the maze and when he reaches a point where the maze takes different directions. He would see if the player is in either of those directions. (by sight of course) if he doesn't see the player he would pick a random direction. knowing the player is still in there somewhere.

And he would continue until he finds the player or reaches the end of the maze. (he might backtrack and check out the forks he didn't inspect) once he figures out he has checked the whole maze he would give up and exit the maze. and continue patrolling outside.








That is how a real AI would do it!

adam 02-14-2002 04:20 AM

To do what I mentioned you would need to include memory in the AI's design. And it would be good if the AI remembered players specifically by account name too.

It would remember that player a hit him about 4 more times than player b and it would try to kill player b more.

TDK_RC6 02-14-2002 04:53 AM

Quote:

Originally posted by Saga2001


I think so. Minimize your signature, its killing me...:(

silly, its a image, it cant be minimized :P

btedji 02-14-2002 08:28 AM

Quote:

Originally posted by TDK_RC6


silly, its a image, it cant be minimized :P

I'm sure you knew what he meant :D

adam 03-24-2002 06:18 AM

Is there nothing to add? aw well. It would likely be a waste of talent if somebody could make such a thing anyhow.

Admins 03-24-2002 06:41 AM

I would say 'path finding in mazes' is making the
thing impossible, in most games corners and walls
make it easy to kill baddies / monsters. It is probably
better to restrict the area where a monster can move
and make it move more intelligent etc. instead of wasting
CPU time with path-finding algorithms.
*just my 2 coins*

I will need to script monsters for Graal2002 anyway,
trying to do it good. An important thing is probably
to not run into the weapon of the player and possibly
try to run around the player or protect itself if it
sees the player attacking.

DarkPyro_2001 03-24-2002 06:49 AM

Okay, new idea. How about we have Stefan do this and I get the cashmonies? :D

ApEhAx 03-24-2002 07:45 AM

Quote:

Originally posted by Faheria_GP2
it's not like any serious scripters play on the crap known g2k1

upgrade us an account or something, then I'll consider

You preachit young one

sage_chaozu 03-24-2002 08:49 AM

hmm.. interesting
 
I want to learn how you would make a maze finding thing. I am not so good on the use of algorithm in this situation. I also agree this is do-able. It would be nice to have such a thing, but if we improve baddies in this sense then we need to improve quests and dungeons. Kind of like how Zelda does. I am not saying to completely copy them but it would be nice to have a dungeon that is more challenging like that with puzzles. I have heard more interesting quests exist on Graal2001 and Classic Graal but I have not been able to really see this because of lag and my slow 250 MHz computer. :(


All times are GMT +2. The time now is 12:46 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.