Bot Progress

Jul 09, 2004 00:59 Bot Progress
I've made this thread to track the progress of my latest bot-building endevour. It seems I try to make one every summer, with Bachser coming out 2 summers ago and an attempt at a decent wandering brain appearing last summer. This time around I'm focusing on bases.

Right now it seeks out all neutral bases. If there are no neutral bases to take it seeks out hostile bases and rapes them. The only cheat here is that the game must be set to allow brains AND give them an advantage. Without the advantage I would have to implement my wandering algorithm into this bot. It wouldn't take much work but the algorithm kinda sucked. It also keeps track of how many map squares it has travelled overall. Right now its around 1,120.

I won't put it up for download right now because I want to settle the following two issues:

*It can't refuel yet
*It sometimes gets stuck next to an enemy base. It won't move or shoot.

Once I get those done, I'll probably put it up for download along with a few maps to try it out on. Granted, it's not as big of a project as Ryanbrain, but just like my other brains, it's an attempt at some kind of tournament-worthy brain.
Jul 09, 2004 04:11
damn ... don't make me fire up my bot project again .... damn you .......

Min
Jul 09, 2004 11:00
Yeah, you're damn right I'm gonna make you fire it up again. I will need your help during the course of making this bot. And I'm sure you'll want some input on the course of yours.

Working on it this morning I find some minor glitches. It can rape bases and take them and then move onto the next hostile base. When it gets low on shells (5 or below) it searches for the closest friendly base to refuel at. It can find the closest base and actually sit on it, that's not a problem.

The first problem is what if the closest base is one we just raped? There's no shells in it. The second problem is we aren't able to tell how many shells are contained in the base unless we're nearby (within 7 squares). I could check to see if the shells in the nearby base ( info->base_shells ) are greater than a desired amount and if they aren't throw out the base and look for a new one, but that wouldn't work. Why? Because my algorithm will keep giving me the closest base, the base that was just raped.

*sigh* Looks like I'll have to use advice I got from Min and use an array for pills and bases and update accordingly.
Jul 09, 2004 18:38
heh, damn .... I didn't wanna play with that bot again for awhile ... but your forcing it outta me!!! ;)

Min
Jul 09, 2004 20:38
Ok, so I've got one problem right now and I don't want to bother with the other ones until I solve this. I can't get the bot to sit still on a base long enough for it to refuel. I think I could solve this problem if I was able to recognize the terrain under the tank but I'm having problems doing that. I'm still not sure how to utilize the terrain mask. For example, if I input coords for a map square in info->theWorld[] that's a base, it returns road, which is what is underneath the base.

My other problems deal with the base array management and raping. The management isn't really a problem, its just that I haven't started incorporating that yet. And the raping problem occurs when it comes from underneath a base and the tank direction is pointing slightly NW of north. Not sure why this is but I should solve it before I add more code and complicate things.
Jul 10, 2004 03:00
Sticks wrote:
Ok, so I've got one problem right now and I don't want to bother with the other ones until I solve this. I can't get the bot to sit still on a base long enough for it to refuel. I think I could solve this problem if I was able to recognize the terrain under the tank but I'm having problems doing that. I'm still not sure how to utilize the terrain mask. For example, if I input coords for a map square in info->theWorld[] that's a base, it returns road, which is what is underneath the base.


record the positions of known bases in an array, and then reference the array when attempting to refuel rather than the mapterrian type .. bases don't move.


My other problems deal with the base array management and raping. The management isn't really a problem, its just that I haven't started incorporating that yet. And the raping problem occurs when it comes from underneath a base and the tank direction is pointing slightly NW of north. Not sure why this is but I should solve it before I add more code and complicate things.


not sure why that would occur, probably have some problem. typo or something, I'd have to see the code to help out more with that.

Min
Jul 11, 2004 10:05
I'm still having problems dealing with getting the base resource listing out of bases. It drives by friendly bases but just sometimes (as I discovered through debugging) winbolo doesn't take its focus off of a nearby base. There's got to be an easier way as I'm assuming Min was able to have his bots somehow choose which base they wanted to refill on.
Jul 11, 2004 16:50
I hadn't gotten to that point yet stickyhead ..... I was still trying to teach my bot to avoid pillbox's so he could collect his neutral bases without dieing.

Min
Jul 12, 2004 07:43 I hope JM reads this...
Ok, I finally was able to get the resources out of nearby friendly bases so that I'm able to put them in an array which holds info about all bases on the map that the bot has seen thus far.

One of the problems was the info->base->idnum numbering scheme. Apparently, as stated in brain.h in a comment, bases are numbered from 0 to number of total refueling bases minus 1. So on CT3, you'd have them numbered from 0 to 15. But apparently info->base->idnum numbers them from 1 to 16, thus throwing off my array index by one. JM, I hope you're reading this. If you are, can you state why info->base->idnum is pretty different from the rest of the base counters in the game? I'm sure there's got to be a reasonable explanation for it.
Jul 12, 2004 14:51
Your right, for the closest base the id offset is off by 1 so you will need to deduct 1 from the id to make it equatable with the id's presented in the other structures. I have updated the documentation for the next release.
Jul 13, 2004 00:48 First Release!
Thanks Elvis.

Here for download is the first release of my bot, Connery. It basically seeks out any neutral bases it can, fuels up, and rapes any hostile bases. It's best to play against 3 or 4 of them at a time. Make sure to ally them before the game starts.

Yes, I know the bot has problems. I still have to fix about 3 of them or so but my first goal is mainly done (aside from some minor tweaks). Next up will be adding LGM killing skills.

So download it, unzip it to your Brains directory and add any comments here. Thanks.
Jul 13, 2004 02:56
you released it eh? ..... heh, that'll give me something to do tonight ... *breaks stickyheads bot*

Min
Jul 13, 2004 07:09
kewl
Jul 13, 2004 08:15
interesting .... seems it at this point hasn't a clue how to deal with pillbox's shooting at it ... also has no idea not to try to refuel on a base guarded by pillbox's .... good work sofar though

Min
Jul 13, 2004 18:53
Min wrote:
interesting .... seems it at this point hasn't a clue how to deal with pillbox's shooting at it ... also has no idea not to try to refuel on a base guarded by pillbox's .... good work sofar though

Min

Well yeah, did I say anything about pillbox avoidance? I do plan on adding a "surrounding_pills" value to the bases array so that once I have more LGM and pillbox tactics, it can build walls to protect itself when refueling. As for pillbox avoidance, eh, that might come in by pillbox stage.
Jul 15, 2004 10:34 release v0.2
Ok, here for download is the latest version of my bot. I've fixed the glitch where it would drive towards the NW mines sometimes. Instead of driving it just sits there and plants a mine if its on land.

Also don't be alarmed if there's a couple of new text files sitting on your C:\ directory. Two of those files output base location and ownership; one for when the bot initially opens and the other when it closes. The third file keeps track of the total distance the tank has travelled being controlled by Connery. Currently I'm at 10,000 squares, about one-sixth of the total squares on a full bolo map.

Along with the brain is a map to try out to get a feel for what it can do. Very simple stuff as you can see but thus far has taken 200 KB of code to accomplish. I eventually hope to release the source, but I wouldn't hold my breath if I were you.
Jul 15, 2004 12:57
And the little guy carpet mines!!!
Jul 15, 2004 16:21
heh....when im losing an open game ill join a bunch of him the ally him, and he'll make defense around my base and mine the enemies...
Jul 15, 2004 18:57
Hehe, kewl. :lol:
Jul 15, 2004 19:04
Pretty cool... you pretty much aware of all the bugs or shall I give you a list of what I saw?
Jul 15, 2004 20:04
I think I am aware of all the bugs there are but one reason that I posted this is so that I can get feedback. Go ahead and post a list here and I can check off if I have them listed somewhere already or not.
Jul 15, 2004 20:30
Well, these aren't exactly bugs I don't think...

Sometimes when it base-rapes, shots go off to the sides. Also, the "get more ammo before you go under 5 shots thing" is a touch faulty. Sometimes it goes to rape bases and it seems like if it just used a couple more shots it'd get through, but it has to go back to refuel. Too bad you can't check to see how much armor an enemy base has so that the bot can get ammo accordingly.

I have a strange feeling that I missed a couple bugs, but I can't recall them off the top of my head. If I see any more I'll post 'em here.
Jul 15, 2004 20:59
I just can't believe how much work goes into even a simple gamebot. I wonder how much work it'll take to create AI.
Jul 15, 2004 21:05
I heard about a project where people were attempting to teach a robot common sense. They had to put shit like this into code for the bot:

"Two objects cannot exist in the same place at one time."
"Dying is undesirable."
"People like to have fun."
"Pain is undesirable."

They went through thousands of these types of "common sense" rules. So, creating AI would take a quite a bit of work, but according to a book I just read we might see it in our lifetimes. You Matrix wackos can shut yer mouths, too.
Jul 15, 2004 21:13
Nova wrote:
Sometimes when it base-rapes, shots go off to the sides.
Yeah, I noticed that too. That's due to it's current velocity having a little bit more speed than it needs. Along the same lines, the tank sometimes drives past a base it means to refuel on. I still haven't gotten that down completely.

Nova wrote:
Also, the "get more ammo before you go under 5 shots thing" is a touch faulty. Sometimes it goes to rape bases and it seems like if it just used a couple more shots it'd get through, but it has to go back to refuel. Too bad you can't check to see how much armor an enemy base has so that the bot can get ammo accordingly.
Quote from "How to write plug-in brains" included with each copy of WinBolo: "Unlike pillboxes, [the brain interface] does not tell you the exact strength of the base, only a rough approximation." I'm sure I could if I kept a running count just like a human does in their head if I felt compelled to but the reason I keep 5 shells in the tank is for other reasons. What if it needs to destroy some blocks or kill an LGM?

Nova wrote:
I have a strange feeling that I missed a couple bugs, but I can't recall them off the top of my head. If I see any more I'll post 'em here.
Oh, there's still a lot more to find. Not sure if that calls for a happy or sad face here.

Acro wrote:
I just can't believe how much work goes into even a simple gamebot. I wonder how much work it'll take to create AI.
The AI, I think, will be the management of all the "modules" I create. One for pillboxes, one for bases, one for LGMs, one for movement, etc.
1 2 Next »
Page 1 of 2 (35 posts total)