Bot Progress

Jul 15, 2004 21:21
Nova wrote:
I heard about a project where people were attempting to teach a robot common sense ... 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.

One reason they would have to do that is they are essentially creating THE first generation of a species. Why do we know that death and pain is undesirable? Because humans that have been around longer than us (ie, our parents) tell us so.

Some of those commands you listed, however, could be reduced to further building blocks of logic. If a bot does something that harms itself, and the bot is cognitive of it, then it can make a connection between what it did and what happened. Same thing for putting two solid objects in the same place at the same time. It should be able to recognize what happened and make cause-effect causation.

Going back to the generations problem, there are bots out there that utilize neural nets. They actually learn by observing and reproducing. Their lifetimes are so short that they can "evolve" by picking the best of the species for a certain trait (or group of traits) and then "mate" them. This mating might happen once a minute or something, not clear on that yet. But by the time you get to the 5,000th generation, you have potentially smart robots.
Jul 15, 2004 21:50
Those commands I listed weren't actual quotes, but just examples of what "common sense" rules would look like.

In case anyone was wondering, the book I read was "Visions" by Michio Kaku. Very interesting book.
Jul 31, 2004 18:58 Few Questions for JM because I'm lazy
Alrighty, I have a couple of questions for JM or anyone else who would know.

1) When scrolling through the objects list using a for loop like one seen below and I come across an LGM, am I able to use the .info member to tell if an LGM is hostile or friendly to my tank? I know that each LGM is numbered according to player number but I'm looking for a quick and dirty way to see if it needs to be hunted down and killed or not.

2) This again deals with the objects list. When I'm in a for() loop looking for LGMs like so..
[code:1:5662cc42d5]bool cLGMBehavior::is_lgm()
{
for (int objs = 0; objs < info->num_objects; objs++)
{
if (info->objects[objs].object == OBJECT_BUILDMAN)
{
if (info->objects[objs].idnum != 0)
{
return TRUE;
}
}
}
return FALSE;
}
[/code:1:5662cc42d5]

and I come across one, will its number on screen change? Meaning, if I choose to save "objs" and use it in another function like so:
[code:1:5662cc42d5]info->objects[objs].info[/code:1:5662cc42d5]
will I still be accessing info for the LGM even if some other object appears on screen?

3) How is a tank or LGM's speed determined? In the comments of brain.h it states that "64 is top speed on road, 48 on grass, 24 in forest, 12 on rubble, crater, water etc." Are the numbers just arbitrary or do they stand for WORLD coordinates/millisecond or something of that nature?
Aug 02, 2004 02:41
no quick and dirty way that I'm aware of, you'll have to keep track of who your allies are and their player numbers.

its worldcoordinates per tick, a tick is 1/50th of a second.

Min
Aug 06, 2004 01:51
Another question here. While making my LGM hunting algorithm I ran into a problem: my tank thought parachutes were LGMs. So I consulted the how-to file and found the enumerated type for objects. When I tested it, however, it didn't work.

[code:1:e9c08f785e]bool cLGMBehavior::is_lgm()
{
if (info->shells < 5)
return FALSE;

for (int objs = 0; objs < info->num_objects; objs++)
{
if (info->objects[objs].object == OBJECT_PARACHUTE)
return FALSE;

if (info->objects[objs].object == OBJECT_BUILDMAN)
{
if (info->objects[objs].idnum != info->player_number)
{
LGM.lgm_now_x = info->objects[objs].x;
LGM.lgm_now_y = info->objects[objs].y;
LGM.objs = objs;
return TRUE;
}
}
}
return FALSE;
}[/code:1:e9c08f785e]

This code scrolls through the object list until it finds either a parachute (returns FALSE) or an LGM (returns TRUE).

The problem comes when the parachute is dropping in on the tank. There are only 3 objects on the whole map: bot tank, player tank, player LGM or parachute. However, when I cycle through the list, it thinks the parachute is a live LGM. This is not supposed to happen, I assume.

I have seen bots with LGM killing capabilities and am starting to wonder how they distinguish between LGMs and parachutes. Is the brain interface fubared or is my code a bit funky?
Aug 06, 2004 17:54
I'm wondering if this related to the bug where Player 1 (who's lost his LGM) sees his LGM slowly running across the map, while Player 2 sees the parachute moving in the exact same position. Could the coding for Winbolo be that the parachute is just a graphic cover for an LGM that operates under a different ruleset (bee-lines to point of death at reduced speed while ignoring terrain and explosions, then changes back to regular LGM with no parachute cover when it "lands"). That would explain how the bug works (Player 1 doesn't see the parachute graphic that's supposed to cover the LGM).

I have zero experience in programming, so take that under consideration when reading the above.
Aug 06, 2004 21:03
I've never personally seen that bug before but it seems like a logical explanation. I'm sure Elvis would be able to answer both of our questions, or at least mine since yours is more of a statement of a glitch.

Also, I am interested in how WBN and the client are able to tell when a tank is killed and how you killed that tank. There are no brain pointers that are set when you kill a tank with a shell yet the client and WBN are able to know that you did.
Aug 08, 2004 17:03
For your own builder:

The man_status field of the BrainInfo structure lets you know his status. The values are:
0 - In tank
1 - Dead, parachuting in.
2 - Out and about in which case the man_direction, man_x and man_y fields will provide more information about where he is.

For other players builders the Object's object type value is set to 5 or OBJECT_PARACHUTE as defined in brain.h.
Aug 08, 2004 17:31
Elvis wrote:
For other players builders the Object's object type value is set to 5 or OBJECT_PARACHUTE as defined in brain.h.

By the way, I am only dealing with other players' LGMs at the moment. But yeah, that's what I thought too until I tried it. Maybe it has something to do with info->objects[objs].object because objs is staying the same. Would a parachute be an additional object on the screen, forcing me to increment objs?
Aug 08, 2004 17:51
Yup, your right, after more digging it isn't being set correctly in 1.14. Will be fixed in 1.15.
« Previous 1 2
Page 2 of 2 (35 posts total)