PDA

View Full Version : Jazz2 BOTS?


Unhit
Aug 24, 2002, 11:15 PM
I don't really know what the people of J2HG can actually do with some programming languages, but I think it is quite much. Well: someone of J2HG, do you think it was possible to programme something like bots for JJ2? This was funny for empty servers :D!

Refalm
Aug 25, 2002, 01:29 AM
Most of the J2HG programme in Visual Basic (I'm going to join them once I've learned that language).

And even some people that could programme in C++ couldn't manage to put bots in JJ2...

Trafton AT: There was, a while a go, quite a bit of testing done with bots. The bots, however, proved unstable. They could crash servers they entered. They had to have their programming changed for each new level they played in. It took a few months for each level, and it was unreasonably hard. And the final project AI was week, it played like a n00b with rabies. The perfect behavor was near-impossible to program, and thus the project was deemed not worth the effort. Issue 2 of Stuff is Good Magazine is scheduled to have an article on this entitled "The Bots vs. The Programmers".

Unhit
Aug 25, 2002, 01:46 AM
Okay...

Super Saiyan
Aug 25, 2002, 02:32 AM
So this project has been stopped?

Newspaz
Aug 25, 2002, 03:01 AM
I've researched quite a lot with bots in the past and I came to the conclusion that it's almost impossible.

It gets possible when you find addresses to control the player (got them)
You'll also need the addresses to locate other players (got them).


The last two pieces are making the character read the level, so he won't walk into a wall when going after a player. And creating it's artificial intelligence. There was only one real atempt to this which got into a working stadium. I will quote the story of the old forgotten player AstroniA here ;). It's a story I found on the old Jazz2City.


Hi Wakeman, it's AstroniA here

I'm afraid I have some bad new for you to post. The
Jazz 2 Bot project has been cancelled.
The reason for this being that the Bots were too
buggy. I admit I'm still a bit of a beginner as far
as writing progs go, so they've been scrapped.
These were some of the bugs I could not resolve:

*) When starting a server, some Bots would not spawn,
despite the settings, causing weird things to
happen.

*) Couldn't figure out how to get a Client-side Bot
to join a server properly. Could cause the game to
crash.

*) Had hassles coding the Bots to "understand" CTF
properly. They seemed to be more interested in
roasting than capturing their enemy's flag.

*) Had hassles coding the Bots for Treasure. Bots
could die when shot, and sometimes didn't drop
gems when shot. Also, Bots would crash game if
they tried to exit.

*) Bots would sometimes just stop playing. They would
also just jump around in one spot like an idiot
and shoot like crazy.

*) Bots sometimes fired 3 weapons at once!

And other misc. techie bugs.

Sorry about it. I know a lot of people were looking
forward to it. Oh well. Hey Epic, what do YOU make of
it? (hint hint :))

Please post this up.
Thanks


However, I think he used a strange technique noone ever got the hang of. The mystery of port 10052. Which is being used on every game to move the players. Oh well. Who knows.... I'll ask Wakeman if he can help me getting AstroniA up here to inform you a little more.

Unhit
Aug 25, 2002, 03:38 AM
Thx for the research.

MaGoo
Aug 25, 2002, 05:26 AM
Half-Life bots are amazing. It's almost impossible to tell if they're real or not, exept for the fact that their ping is always 5.

Michael
Aug 25, 2002, 06:34 AM
I rememebr reading that :P

Bots wouldn't work in JJ2 or in any arcade game especially with custom level option IMO. I think project is dead and only some super nerd super midn alien could make them and would have to program for each level. they'd also get boring I think.

Super Saiyan
Aug 25, 2002, 08:32 AM
Hmmz, can I give someone a idea by saying UT: bots?



Uhm wont work.. Nevermind. Can you guys restart the project and give it another try? Comeeee oooon!!! For as example, begin with Battle1, Battle since thats the easiest mode in jj2. Just please try it.

EvilMike
Aug 25, 2002, 12:34 PM
Jazz2 bots can't work due to pathfinding issues. If they are to be able to move around in a level, you need to be able to set up which way they can go IN THE J2L FILE. This is how UT bots work. You place certain bot pathfinding objects throughout the level, and the bots know where to go, where to jump, and so on because of that.

Bobby aka Dizzy
Aug 25, 2002, 01:14 PM
To do bots in jj2 we would first have to understand the .j2l level files so bots could "learn" levels. Also, if bots were to "learn" levels someone here would basically need to be a complete AI expert and be capable of programming a very very smart bot especially considering it would have to work off of memory addresses.

Monolith
Aug 25, 2002, 06:47 PM
Actually, neither the AI or pathfinding should be that hard. Programming paths into level like in UT is only an optimization for 3D worlds. As long as you could just access the collision mask for the level, that would be enough. Movement is only limited to running left or right, and jumping. Jumping onto platforms would be the hardest part, but still possible. Actually, we would also probably have to access the events infomation for the level too.

Tmansdc
Aug 25, 2002, 07:25 PM
Originally posted by MR MAGOO
Half-Life bots are amazing. It's almost impossible to tell if they're real or not, exept for the fact that their ping is always 5.

what half-life bots would those be? Tell me so I can download them please.

Unhit
Aug 26, 2002, 07:48 AM
Originally posted by EvilMike
This is how UT bots work.

I also thought of something like that. Could that perhaps be fixed with a small programm (ok, someone needed to make waypoints for all levels he wants to play then....and the AI depended on the one making the waypoints...)

Cpp
Aug 26, 2002, 09:50 AM
I think I have an idea for this AI.
I suggest that the bot program should be able to write available paths for each level by itself. So far I know how to retreive the file name form jj2 so the prog can save these AI files into AI folder for example with the same file name as the level but with different extension like: Battle1.j2l, Battle1.ai. This would allow bots to learn how to play different levels by them selves. For example the first time when a bot enters an unknown level it will try different moves like running left/right for example and detect if it is moving. If it is not it will probably jump up and continue moving right to see if it goes anywhere. If not the bot program will write that data down (which will later be saved into the Battle1.ai and loaded the next time this level loads) to remember it so the bot will never try to jump here again. After that he should turn around and do the same thng. Then start with jumping, buttstomping, flying, etc. so slowly we can get the whole image map of a level. And for each level as well. We'd just need to spend a lot of time on this.

I hope you guys like my idea.:roll:

EDIT: Bugs...

Unhit
Aug 26, 2002, 11:30 AM
Not a bad idea, but won't weapons change some settings in the x.ai?

Trafton AT
Aug 26, 2002, 04:50 PM
Wow, someone actually quoted meh. ^_^

Except for the SiG part, it all remains true. Bots do not look like they will be happening any time soon. Oh well.

Monolith
Aug 26, 2002, 07:10 PM
Good idea Overlord. Another thing that would help that process along would be to have the bot 'watch' what the other human (or bot) players do. That would make the learning process go a lot faster rather than just randomly guessing.

Trafton AT
Aug 26, 2002, 07:11 PM
Yes. Monolith is right. I think they should have adaptive intelligence.

URJazzCC
Aug 26, 2002, 09:18 PM
Overlord's Idea sounds pretty good. Then whenever you create a new level you could get a bot to 'learn' the level, then add it into the zip. But one hard thing will be programing the bot. Like wheather it should get a carrot, weapons, or attack, or capture the flag, or something else. And if a bot is created, then a command-mode would be nice. Namely for CTF, so you could say the commands that are oftenly used in team chat and it will respond to them.

Unhit
Aug 26, 2002, 09:58 PM
Originally posted by URJazzCC
Overlord's Idea sounds pretty good. Then whenever you create a new level you could get a bot to 'learn' the level, then add it into the zip. But one hard thing will be programing the bot. Like wheather it should get a carrot, weapons, or attack, or capture the flag, or something else. And if a bot is created, then a command-mode would be nice. Namely for CTF, so you could say the commands that are oftenly used in team chat and it will respond to them.

That's a good idea, something like the menu in UT.

Monolith is also right. Perhaps two modes: explore & learn...

EvilMike
Aug 26, 2002, 10:27 PM
I *think* the best way a bot can be programmed to adapt to a level (most skillfully, at least), is for it to observe the keystrokes of the players (this probably can't work for a whole server; just one player), and look for patterns regarding keypresses and the x,y coordinates. That way it will be able to jump into ammo, over pits, and so on. Of course, this will be extremely, extremely, extremely difficult to program. Heck, let's just say it's impossible.

Trafton AT
Aug 26, 2002, 10:58 PM
This is why the project was ditched in the first place.

Txl Kill
Aug 27, 2002, 04:48 AM
Does anyone know how to get a freaking bot to accually connect into your server.. how to spawn one...? I cant figure it out i want to play around with a few things will someone tell em?

Cpp
Aug 27, 2002, 04:57 AM
Observing other players may not be a that good idea since some players would take an advantage if that and do dumb things that bots will then learn and do. It would be good only when players pass an area bots were unable to pass by themselves. Or maybe when finding secret warps.

White Rabbit
Aug 27, 2002, 05:39 AM
Originally posted by Monolith
Good idea Overlord. Another thing that would help that process along would be to have the bot 'watch' what the other human (or bot) players do. That would make the learning process go a lot faster rather than just randomly guessing.
Come on! They're only bots! Not humans. Bots are "stupid"!They're not human beings, who can actually learn things! They only do what they're programmed to do and nothing else. And if you could make bots do that, who would have the programming skills to do it?

Btw, what about the demo in Jazz2? If you leave Jazz2 alone for a while, it starts a kind of demo. I dunno if it's just a recorded game, but if it isn't, then something must be controlling the rabbit in the demo. What do you think?

FQuist
Aug 27, 2002, 06:21 AM
It's a macro, White Rabbit.

Well, some good suggestions here. It got me an idea similar to Evilmike's.

Have a program which records your keystrokes and coordinates. You just play a few internet games in a level, and after a while a list of possible coordinates and places with springs/weapons will have been collected. With these coordinates the bot will be able to see how the level looks like(it assumes walls are at unknown places)

I had another thought.. the jj2 level format is compressed. But in order to load a level jj2 has to decompress it and put it somewhere in the memory. So you should be able to find it.

Super Saiyan
Aug 27, 2002, 07:18 AM
So you guys are going to re-open the project? Why not giving a another try. Is it that hard? :) You guys have a lot ideas, so my opinion is just go start that project.

Newspaz
Aug 27, 2002, 09:04 AM
Well, who with a reasonable knowledge of a fast programming language is going and have a try on it?

Cpp
Aug 27, 2002, 11:27 AM
Probably the J2HG when we have enough time and realize it's time to put more work into it.

Super Saiyan
Aug 27, 2002, 11:53 AM
Come on, if J2HG made those BOTS I'll be thankfull to them for the rest of my life :)

Monolith
Aug 27, 2002, 05:34 PM
Well, I could help whoever to flesh out how to program the AI, but I won't have the time to actually do the programming.

Krezack
Aug 28, 2002, 04:06 AM
It has been tried before. As far as I know it never panned out.

~SPLASH~
Aug 28, 2002, 07:28 AM
1. Fly over to a country where slavery is legal
2. Get slaves
3. Make them play Jazz2
4. Forbid them to use the chat function

Et voila, 4 simple steps to get decent bots! :rolleyes:

mirrow
Aug 28, 2002, 09:50 AM
aw make routes for each lvl like overlord said and if another player is in the area (10 tiles arround the place where the bot actually is) the bot returns to fight after this guy until this guy is maybe 30 tiles awaay from his route and maybe u could add some extra jumps for each lvl 'taught by any good player' to use them if the enemie is in any special position...
if the bot has just 3 hearts he searches for an carrot ...

this will work :P

Unhit
Aug 28, 2002, 10:29 AM
Good ideas, mirrow.

Super Saiyan
Aug 28, 2002, 11:50 AM
I think the hardest of this will be the 'brains' of those BOTS. Like, what should a bot do when your out of his sight...? Going to cirkel the lvl around and around, or hunt you? And like, how is a BOT supposed to get ammo if the ammo wont regenerate caused by lag in the server. But I really want J2HG, or whoever to give it a try to make it, it might turn on well, Or not :p

Unhit
Aug 28, 2002, 09:33 PM
I guess an even bigger problem is to get the bot using weapons where they are useful, i.e. RF in big free spaces or bouncers when the enemy hides behind a wall...

$tilettø
Aug 31, 2002, 11:19 PM
you can program something in it like Player is at pos 5.5 shoot bouncers towards the wall i gues?

and if the bot dies just let him respawn with all levels so you wont get that lagg problem ;P

Trafton AT
Sep 1, 2002, 10:07 AM
Hmmm...Several people have been lately pretending to be chatting bots, and someone (maybe even me) may make a chatting bot, but not a playing bot.

FQuist
Sep 1, 2002, 10:49 AM
For finding out the level, I got this idea:

Find out the height and width for the level.
Warp the bot to each one of the coordinates.
Now, if the bot isn't able to move at all, he's standing in a masked block. If he's able to the block is unmasked. If the ammo count for a weapon increases, you know he's the tile contains ammo. If he suddenly moves upwards or sidewards you know you hit a spring, belt or wind. To find out wether he's on a diagonal block, you can walk left or right and see if he also moves up or down.

This way you can create a ".ai" map of the entire level without having to code too much.

Trafton AT
Sep 1, 2002, 10:53 AM
Along with what FQuist said, the bot could warp to every single tile and see what happens to him on that tile to see what event there is there. A program could compile the results for all the levels in a collection.

FQuist
Sep 1, 2002, 11:44 AM
That's exactly what I said. ;p

Fawriel
Sep 1, 2002, 11:48 AM
But if he warps to every block once,he would just see if a tile was masked or unmasked,not if the tile shows a diagonal line(or something more complexe)!

Unhit
Sep 1, 2002, 09:45 PM
If it shows a diagonal line, he could get stuck, but was able to shoot. That was also a important thing when programming this programme, imho.

FQuist
Sep 2, 2002, 07:59 AM
If a block is masked you can warp to the block above and see if it's diagonal.

FQuist
Sep 2, 2002, 08:01 AM
Hmm, one problem. Doesn't jazz also get stuck when warped to a tile next to a masked block? Well, you can still find out by going to the tile near that one, and if you aren't stuck the other tiles aren't masked either.

Super Saiyan
Sep 2, 2002, 11:21 AM
So you guys are saying the bots have to warp in EACH tile in the level...? Hmm, well that would be a good idea but it would take long before the bot is ready, except if they can warp very very fast.

Trafton AT
Sep 2, 2002, 12:06 PM
That's exactly what I said. ;p

Not exactly. This also answers Super Saiyan's question. I meant that there could be a program to automatically do this. It could store levels in a database. After all, the amount of levels often hosted isn't high. It would just have to do the scanning thing once.

Unhit
Sep 2, 2002, 10:39 PM
Originally posted by Super Saiyan
So you guys are saying the bots have to warp in EACH tile in the level...? Hmm, well that would be a good idea but it would take long before the bot is ready, except if they can warp very very fast.

Everyone ough to have that programme then, and if he/she uploads the lvl to J2O, the levelcrator simply includes the .ai-file, so it is made ONCE and for all. Otherwise, every downloader had to make it for himself.

Matrix
Sep 3, 2002, 05:15 AM
Couldn't you just create a mask of the entire level and save it as your own format?. The program could then read the file into an array and then the bot could place things like to cur pos of each player in the array to so it can then find a path.

for example:

1 = Filled in
0 = Empty
P = Player
B = Bot

111111111111111111111111111
1110000000000000000000000B1
111001111111111111111111111
1110000000000000P0000000001
111111111111111111111111001
111000000000000000000000001
..etc.

It could then find the path to the other player and shoot them.

Or for treasure hunt:
1 = Filled in
0 = Empty
P = Player
B = Bot
G = Gem

111111111111111111111111111
11100GGG00000000000000000B1
111001111111111111111111111
111000G00G000000P0000000001
111111111111111111111111001
111000000000000000000000001
..etc.

The user would have to do this them selves but with a simple editor could create a file with the level in its masked format. You could then create a program that hosts the file on a different port than jazz and when a bot wants to connect, it d/ls the file and connectes to the JJ2 server.

Now the hoster would have to create the file but standard levels could be created?

Just a thought...

Matirix

Neobeo
Sep 3, 2002, 06:24 AM
Firstly, the masking part shouldn't be too difficult... there's somewhere in the memory that does it :D and gives the whole 32x32 mask of the tile at that location

The hard part of making the bot, as some had already managed to pick out, is for it to actually find the path. Let's take Matrix's example for instance... its a simple path, but might take ages for a bot to just calculate that short path.

Let's say someone does manage to create some algorithm (probably some alien lifeform) that might allow the bot to find its way around the path... then there are also warp and trigger zones... so on the long run this is hardly possible...

Then if someone can figure out how to calculate the path of where the bot should take, then, well, there are many other limits (not exactly limits, but I couldnt find a better word) in programming which prevents the creation of a bot... *dont have any more examples currently*

So the closest we can come to a JJ2 Bot, as Overlord (i think) has mentioned, is just to "study" a player's movements and stuff for a few minutes and practically mimic it :rolleyes:

^^ Wow I didn't realise I've written so much.... lol

FQuist
Sep 3, 2002, 08:03 AM
Originally posted by Matrix
[B]Couldn't you just create a mask of the entire level and save it as your own format?. The program could then read the file into an array and then the bot could place things like to cur pos of each player in the array to so it can then find a path.
[...]


That's essentially what my idea does, creating a mask by testing all blocks.

Neobeo: I barely know ai stuff, I can imagine pathfinding is hard. Easiest would be making an .ai file editor where you can put in paths

Newspaz
Sep 3, 2002, 08:18 AM
You could use an unused event as a path event. Like event 255

Link
Sep 3, 2002, 08:32 AM
If it did all work out, there would be another problem. The bot would be too good.

If it knew the position of every person in the level, then it would go to them. Regular players don't know the exact positions of other players unless they can see them. You can guess, but you can never know for sure until you see them. So A.S. (artificial stupidity) would have to also be programmed in the bots.

FQuist
Sep 3, 2002, 08:32 AM
But that way you don't know the level itself

Krezack
Sep 3, 2002, 08:38 AM
Originally posted by Link
If it did all work out, there would be another problem. The bot would be too good.

If it knew the position of every person in the level, then it would go to them. Regular players don't know the exact positions of other players unless they can see them. You can guess, but you can never know for sure until you see them. So A.S. (artificial stupidity) would have to also be programmed in the bots.

We want some form of challenge don't we? ;-P

Trafton AT
Sep 3, 2002, 10:47 AM
Here's one problem:
The bot is playing battle1 and starts in the start position that you can't get out of without using a copter. However, the bot has no idea of this, so it stays in this area, and never goes off to play elsewhere.

The second problem:
Even if the bot gets the copter, it would have no idea what to do with it. It could say "all tiles on every side clear-moving right" and go off towards the bouncers instead of up to the water shield area. Since bots do not understand cause and effect, this would become a big problem.

Unhit
Sep 3, 2002, 11:03 AM
That's a big problem indeed.

Trafton AT
Sep 3, 2002, 12:16 PM
It would hard to "adapt" levels to this. For instance, while a bot could completely rock at Battle2, sending it to a Foo Races level would be a disaster. The only way around this that would not require a really really really complexly executed solution would be to tell it specific things about the level like "Go up, not to the right if you get a copter item on battle1." Of course, the programmers couldn't do this for every level that is hosted often. Thus, the bot would have a huge disadvantage, which is one of the various reasons playing bots were scrapped (no pun intended) after these issues came to light.

Unhit
Sep 3, 2002, 10:44 PM
I guess you also had to tell the bot before warping around if it's battle, CTF etc. If it should be CTF, he couls warp around and then look for short ways /ways where carrots are from one base to the other.

What I think that could be very difficult is to let the bot jump on the right places and not that he stops in front of a wall or something, but jumps out from his running. This way, he won't be that slow.

Anyways, we also needed two different scripts: one for Jazz, one for Spaz, as i.e. Spaz sometimes gets faster to certain places via his double-jump, while Jazz has to stand first.

Neobeo
Sep 4, 2002, 01:57 AM
Ok... let's just basically go through every function a Jazz2 Bot can have... Well, for a start it is possible to make the bot just stupidly run around and shoot when it "senses" a player within 10 tiles of it... But as I've pointed out there are too many limits

*never mind* every1 has gone through that... but anyway
1) masks - dats possible
2) sensor - dats possible
3) weapon choice - dats possible
4) path finder - dats half-possible
5) thoughts - dats impossible

what i mean by thoughts, is like... lets take this situation where 1 is wall, 0 is nothing, A is warp 1, X is warp target 1, C is warp 2, Y is warp target 2, B is bot, P is player

The bot obviously wants to get to the player

11111111111111111
10000000000A00001
10C000X0B00A0Y0P1
11111111111111111

the bot will just keep moving right in a neverending loop

artificial stupidity, like Link has mentioned also gives another limit
for example, many ppl use layer 3 in their levels to hide certain secret areas... but depending on how the bot is programmed, it either finds all secret areas or doesn't find any at all

my conclusion: lets say every1 on jazz2online knows programming and stuff and work on this for 10 years, and we combine all the code together, the bot still wont come 1% as close to a real human player :D

FQuist
Sep 4, 2002, 06:44 AM
We can try, at least. Even a stupid bot could be fun. He would be tricked by warps but would also be able to do things we can't do.

Neobeo
Sep 4, 2002, 07:28 AM
hehe... and the bot will win every test level with ease when everyone else finds it impossible

Cpp
Sep 4, 2002, 07:37 AM
Man! You people just can't solve anything on your own :D

Even if a bot would enter an infinite loop we can still record his pos and write a pos history log so the bot program can detect that loop and try something else.

Another (and probably better) solution is that we make/program some assault tactics (excluding combat and defence tactics in this example) so the bot will randomize (using RND) and try various assault tactics like running right, jumping right, kicking, etc. to reach and kill the player rather than just running right in an infinite loop like NeoBeo said. And so what' if bots are not close to real human players... Hey! They're bots. We play against the computer (AI) here. Even Epic was unable to program such bots (talking about UT here). They are computer-controlled players and computer needs no mouse/keyboard to control them. It's just like if you had your brain connected to the computer. ;)

Ow and I have to say that the mask thingie is a good idea. The bot should see only the same amount of tiles as every player sees on the screen.

Neobeo
Sep 4, 2002, 08:56 AM
ok... Overlord, so ur saying that the bot just does things randomly... well, it doesn't sound too bad, just that

its not too feasible because:
1) everything's pointed out already...
2) imagine a player who goes "up-down-left-right-jump-specialmove-buttstomp-etc." in an everlasting loop (random order) kinda irritating isn't it?

well, now that i thought of it, its not very possible for bots to be uhh... fully compatible... with new levels... so overlord's level.AI idea is quite a good one

*still searching for list of why bots are... well....*

nvm... ill post again sometime l8r, after some1 replies

Monolith
Sep 4, 2002, 07:31 PM
The best way to make a bot look as human as possible is to have it learn by watching other human players play. From tracking other players position, velocity, and status, the bot could learn the nature of the level and common paths it can take.

Neobeo
Sep 4, 2002, 08:45 PM
Originally posted by Monolith
The best way to make a bot look as human as possible is to have it learn by watching other human players play. From tracking other players position, velocity, and status, the bot could learn the nature of the level and common paths it can take.

yea... this is a good idea... *if the level was err... stable (couldn't find a better word* because these days most levels use dectruct, collapse and trigger scenery and so on

so the original player takes one path
but the bot cannot copy that path because by that time the level would have "changed"

so in the end, the bot needs to "think" by itself after all

Unhit
Sep 4, 2002, 11:01 PM
Originally posted by Monolith
The best way to make a bot look as human as possible is to have it learn by watching other human players play. From tracking other players position, velocity, and status, the bot could learn the nature of the level and common paths it can take.

Perhaps you even should get the problem reading EXACTLY out where the player goes, where he takes ammo and where he epsecially uses it. Of course, the "tester" shouldn't just shoot around for fun then, or the bot could get problems.
Othrwise, the bot should also wait at some places for respawning ammo/carrots. The only problem I see here is that you'd have to get a good player to create the .ai file then...

Cheeze
Sep 5, 2002, 04:14 PM
There are AI programs out there beging developed and although i haven't really taken a look at the code or anything, my assumption is that it could do some sort of primitive problem solving. This probably could be implimented into whatever masking stuff fquist was talking about, along with some system of finding out where players are, and then the bot can make simple decisions, like shoot at someone until he runs away, and either chase him, get a carrot, or do whatever he needs to do.

That's oversimplifying things, but if this ever picks up, taking a look at freshmeat or sourceforge might help out with the AI.

As for chatting, the coding is ridiculously simple, and i have some simple little programs around on my computer.

-cheeze

djazz
Jan 5, 2010, 04:57 PM
I was browsing the archive and suddenly...

Sry for bringing back this amazing thread, but I couldn't resist, I just love playing around with the GIP and other JJ2 bots :D
I don't know the status of this in your thoughts, but here comes some things I know and some ideas...

Just a "breakpoint": Should there be joining bots that download the level, read it, moves like a normal joining client OR an external program that either using the JJ2 window as host, or a special program that emulates JJ2.
I would suggest a host of JJ2, as this would give the most realistic movements, using JJ2's engine, and it could read the J2L/J2T files.

It is possible to make a joining bot at the moment, but it can't move and will get Connection Timed Out if server is running JJ2+. I'm sure there is a way to work around this, but then there is next problem: Proper physics. As the joining bot not have access to the sourcecode or a JJ2 window, this would be hard, to replicate the JJ2 movement engine.

And now, as the J2L and J2T file formats knowledge are increasing. Reading the level's mask, layer 3 (for hidden spots), all events and their parameters, and using the JJ2 as host, would make everything at least a little bit simpler.
Reading memory addresses is needed to locate ammo, players, carrots and other things.
But there is still much to do to make a bot actually act as a bot, and maybe the "copy player movements" plus some random decisions will make the bot more "alive", and somewhere to store all the data needed by the bot (".j2ai" files?). The bot maybe should run the level with different trigger states, destruct/stomp/collaps-scenery and/or find the most common paths, like a heatmap, and store it. It would also store the level's CRC so it can see if level hs been changed since the bot "learned" it.

Another good thing that FQuist stated was warping around the level checking mask and movement. Now the mask can be fetched from the J2L+J2T, then maybe just warp around and try different moves, and where they lead, and shoot and see where it hits. This maybe will lead to infinitive combinations.


I would be glad to hear your oppinion! O+

Crazy Rabbit
Jan 6, 2010, 01:15 AM
I have one idea...Make programmed bot file for Zaitox CTF...
But plz dont ask me how make bots...Im loser at this... :D

Lithium
Jan 6, 2010, 07:05 AM
We need a bot who can move around and play. If possible.

Stijn
Jan 6, 2010, 08:23 AM
What do we need it for?

Lithium
Jan 6, 2010, 08:26 AM
Uh,I don't know,maybe for a new gamemode or something? Players VS Bots server or whatever?

blurredd
Jan 6, 2010, 10:54 AM
I don't really support the idea of having bots join servers due to issues of being able to tell who is or isn't a bot, plus it should be only the server that decides if a game should have bots. Also, it's entirely possible to have bots produced by the server through JJ2. I haven't looked into the details yet, but it should easier to do nowadays.

djazz
Jan 9, 2010, 06:05 AM
I don't really support the idea of having bots join servers due to issues of being able to tell who is or isn't a bot, plus it should be only the server that decides if a game should have bots. Also, it's entirely possible to have bots produced by the server through JJ2. I haven't looked into the details yet, but it should easier to do nowadays.

Sounds good, to have bots hosted by server instead of joining ones, maybe a plus-feature in future?

I have now made a simple bot that using a JJ2 window as host and read player positions, who has flag etc. and uses "keyboard simulation" to move the player (the external program "press" keys on the keyboard to move the player). I've hosted a "Fight the BOT" server all day and it was a lot of fun, particularly the duels (player VS bot battle) or 2vs2 (players VS player and bot in CTF). The bot fires and jumps around, following the player.
I will improve it to make it defense bases, teamchat, find carrots, attack others etc.

http://jazzjackrabbit.net/sgip/bot_01.png

As you see, the player uses position offsets, where 0x0 is at the player in target.
When the player is above the bot, the bot starts to jump, and when below, nothing. If the player is below and bot is on a vine, bot press down arrow to get down from the vine.
Health shows the bot's health. In future, the bot will start look for carrot when on low health.

To see the bot in action, please ask me and I can host it.

Crazy Rabbit
Jan 9, 2010, 02:39 PM
Ummm...Excuse me, can you make your bot to difficult...Maybe he will be make traps,camps or etc...

Troglobite
Jan 10, 2010, 06:28 PM
Bots aren't the future, bots are today!

I haven't seen the bot in action, but this idea amuses me immensely. Great job.

DanZeal
Jan 11, 2010, 10:09 AM
We would probably use a bot for Zeal Alpha if the bot could leave the server when it is more then 4 players or something and rejoin when it is less. Bots added to plus would be great.

Troglobite
Jan 11, 2010, 05:40 PM
I have now played against the bot, and it was pretty entertaining. It was considerably more dangerous than I expected already, and it sounds like there is work on making it smarter, so it could become a rather fun training tool on some levels, or a good way to populate empty servers.

Crazy Rabbit
Jan 11, 2010, 10:22 PM
Ye...Bot is very helpful if player havent internet...Bot will working without internet?

djazz
Jan 11, 2010, 10:38 PM
I have now played against the bot, and it was pretty entertaining. It was considerably more dangerous than I expected already, and it sounds like there is work on making it smarter, so it could become a rather fun training tool on some levels, or a good way to populate empty servers.

Thanks!
Yes it's dangerous sometimes because it shoot fast and always chase you!

I've added some movement rules to JE, so when bot plays JE, it can capture, score and avoid most walls/pipes in that level. This is yet hardcoded in the program, because i don't yet know how to read J2L files with C/C++ (This is my first C/C++ program, so Hello, World!)

Ye...Bot is very helpful if player havent internet...Bot will working without internet?

Well, yes it works without internet, but if you want to play against the bot you need to play splitscreen, because the bot uses global simulated keypresses. The controls the bot use is WASD for moving and GHJ for jump/fire/run.
The program won't be released anytime soon, because it could be used to cheat (see player positions, always fastfire).

Troglobite
Jan 12, 2010, 08:22 PM
I agree with pretty much everything Hunter said, as an ideal bot. However, writing a learning program like that sounds way more complicated than DJazz's current bot, and for the moment, I enjoy what already exists, but am looking forward to any future advancements.

Valeriy
Jan 16, 2010, 09:38 AM
Well, I agree both with Hunter and Troglobite. It sounds like an ideal bot, but I believe it's easier to give bot original moves instead of trying to make him learn moves from players. Maybe bot should have to break his "main cycle" sometimes, choose random or most fitting "move" (i.e., if opponent is few squares below - use a special move) and perform it.

I don't think that people ever made learning bot for multiplayer game, because it's just hard to filter "good" and "bad" in recorded actions (imagine a player joining the game and just jumping on one point for hours; what will bot learn then =)

Crazy Rabbit
Jan 20, 2010, 04:21 PM
Uh...This bot learning all moves on his "eye"! :)
If you teach this bot more and more he can become elite "player"?