.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   GrogBot (http://forums.bots-united.com/forumdisplay.php?f=54)
-   -   1.1 and 2.0 Progress (http://forums.bots-united.com/showthread.php?t=2667)

Akz 18-09-2004 21:02

1.1 and 2.0 Progress
 
Arr!

Had nothing else to do, so I decided to tell you about my evil plans. 8D

GrogBot 1.1
EDIT: Has been released and can be downloaded from the filebase.

GrogBot 2.0

"The next generation of grogbot" :P
  • A longer scale project than the first one was. The bot will be written from scratch, and it will not be based on any of the bot templates/sources available.
  • It will be an open-source project.
  • I'm mostly doing it because the code in the first GrogBot was *erm...* sort of badly designed, and the bot will also be more "mine" than the original, which was based on the HPB bot 3.0 source.
The first GrogBot 2.0 spawned into the game. Sitting there, doing nothing. WOW!
http://koti.mbnet.fi/grogbot/crossfire0000.jpg

Tell me what you think. Suggestions are always welcome. ;)

AzShadow 18-09-2004 21:07

Re: 1.1 and 2.0 Progress
 
I don't really understand the features in 1.1 but they're probably good. :D

Still waiting for 2.0 which allows to do so many good things...

Pierre-Marie Baty 19-09-2004 16:57

Re: 1.1 and 2.0 Progress
 
good luck ! =)

Ailean 20-09-2004 17:03

Re: 1.1 and 2.0 Progress
 
You're in the pvk2 team, so could you, eh :o , ... sneak a bot in the core? :D Or at least try to make one that's *tightly* integrated with pvk2?

yes, yes, I know the hl2 sdk isn't released yet, but asking doesn't hurt :D

And, I haven't paid attention to it yet, but some people told me all those grogbots speedhack ...

Akz 20-09-2004 18:16

Re: 1.1 and 2.0 Progress
 
Quote:

Originally Posted by Ailean
You're in the pvk2 team, so could you, eh :o , ... sneak a bot in the core? :D Or at least try to make one that's *tightly* integrated with pvk2?

It's very possible that I'm going to make a bot for PVK2 too, but I've been thinking about releasing it as a third-party product. Nothing has been decided though. ;)

Zeta 24-09-2004 02:41

Re: 1.1 and 2.0 Progress
 
I like the feature to command the bots :D and er what's a booty Tag mode?

Akz 24-09-2004 18:00

Re: 1.1 and 2.0 Progress
 
pvk_temple for example. There's one treasure chest in the map placed somewhere. The objective is to grab the chest, and hold it to gain points. You get scored every 10 seconds or something while holding the chest.

Akz 26-09-2004 19:29

Re: 1.1 and 2.0 Progress
 
Whoa!

I've been working on the A* pathfinder for GrogBot 2.0 lately. I never thought that I could be able to understand such a big thing as A* is, but when I finally started gathering information about it and writing my own implementation, I began to understand how A* actually works.

I got it working pretty fast, but it was really SLOW at first. Unusable... It took half a minute to calculate a path in a map with ~200 nodes. After some little optimizations, I got it to calculate the path in 1-2 seconds. More faster than before, but still far too slow.

It took me two days to understand what the problem was :|. I was logging every GetItemCount() call to an external file, which slowed it down A LOT. After removing those two little lines of code, it's working a lot better. Sure it isn't the most optimized one, but it works!

Code:

void CPathfinder::FindPath( CNode *start, CNode *end )
 {
        m_bSearching = true;
 
        SAFE_DELETE( m_pResult );
        SAFE_DELETE( m_pOpenList );
 
        m_pOpenList = new CList<astar_t>;
 
        // Store the indexes of the start and end nodes
        m_iStartNodeIndex = g_NodeManager.GetNodeIndex( start );
        m_iEndNodeIndex = g_NodeManager.GetNodeIndex( end );
 
        for ( int i = 0; i < g_NodeManager.GetNodeCount(); i++ )
        {
                // Initialize the values.
                m_Nodes[i].open = false;
                m_Nodes[i].closed = false;
 
                m_Nodes[i].f = 0.0;
                m_Nodes[i].cost = 0.0;
                m_Nodes[i].heuristic = 0.0;
                m_Nodes[i].parent = -1;
 
                m_Nodes[i].index = i;
 
                m_Nodes[i].pNode = g_NodeManager.GetNodeByIndex( i );
        }
 
        // Mark the start node as open
        m_Nodes[m_iStartNodeIndex].open = true;
        m_pOpenList->Insert( &m_Nodes[m_iStartNodeIndex] );
 
        Advance();
 }
 
 void CPathfinder::Advance( )
 {
        int i;
 
        if (!m_bSearching)
                return;
 
        int loops = 0;
 
        while ((m_bSearching) && (loops < 100))
        {
                loops++;
 
                float        smallest_f                = -1.0;
                astar_t *pChosen                = NULL;
 
                // Find the node with the smallest f from the open list.
                for ( i = 0; i < m_pOpenList->GetItemCount(); i++ )
                {
                        astar_t *pCurrent = m_pOpenList->Get(i);
 
                        if (!pCurrent)
                                continue;
 
                        if ( (pCurrent->f < smallest_f) || (smallest_f == -1.0) )
                        {
                                smallest_f = pCurrent->f;
                                pChosen = pCurrent;
                        }
                }
 
                if ( !pChosen )
                {
                        m_bSearching = false;
                        return;
                }
 
                // Check if this node is the goal
                if (pChosen->index == m_iEndNodeIndex)
                {
                        // The path has been found!
 
                        astar_t *pCurrNode = pChosen;
 
                        m_pResult = new CList<CNode>;
 
                        while ( pCurrNode )
                        {
                                m_pResult->InsertAtTail( pCurrNode->pNode );
 
                                if ( pCurrNode->parent != -1 )
                                    pCurrNode = &m_Nodes[pCurrNode->parent];
                                else
                                        pCurrNode = NULL;
                        }
 
                        m_bSearching = false;
                        return;
                }
 
                CList<CNode> *pPaths = NULL;
                       
                if (pChosen->pNode)
                        pPaths = pChosen->pNode->GetPaths();
                else
                        continue;
 
                if (!pPaths)
                        continue;
 
                // Mark this node as closed
                pChosen->closed = true;
 
                // Remove from open list
                m_pOpenList->Remove( pChosen );
                pChosen->open = false;
 
                // Loop through the possible successors
                for ( i = 0; i < pPaths->GetItemCount(); i++ )
                {
                        CNode *pNode = pPaths->Get(i);
                        astar_t *pCurr = &m_Nodes[pNode->GetIndex()];
 
                        if (!pNode)
                                continue;
 
                        // If this node is linked to itself for some unknown reason, skip it.
                        if ( pNode == pChosen->pNode )
                                continue;
 
                        // Calculate the new cost.
                        int new_cost = pChosen->cost + g_Util.GetDistanceBetween( pChosen->pNode->GetOrigin(), pNode->GetOrigin() );
 
                        // If this node is not touched yet OR if a better route has been found...
                        if (((!pCurr->closed) && (!pCurr->open)) ||
                            (((pCurr->open) || (pCurr->closed)) && (new_cost < pCurr->cost)))
                        {
                                m_pOpenList->Remove( pCurr );
 
                                pCurr->cost = new_cost;
                            pCurr->heuristic = g_Util.GetDistanceBetween( m_Nodes[m_iEndNodeIndex].pNode->GetOrigin(), pNode->GetOrigin() );
 
                                pCurr->f = pCurr->cost + pCurr->heuristic;
                               
                                pCurr->parent = pChosen->index;
 
                                pCurr->open = true;
                                m_pOpenList->Insert( pCurr );
                        }
                }
        }
 }
 
 CList<CNode>* CPathfinder::GetResult( )
 {
        if (m_bSearching)
        {
                g_Output.Log( LOG_DEV, "CPathfinder::GetResult(): ERROR: Search in progress." );
                return NULL;
        }
 
        return m_pResult;
 }

EDIT: Code tags are back.

Pierre-Marie Baty 27-09-2004 14:30

Re: 1.1 and 2.0 Progress
 
The code tags are broken... I know... this seriously sucks! There's nothing I can do cause Onno hasn't opened any SSH account on the server for me yet!!!

elitejavi 22-10-2004 20:55

Re: 1.1 and 2.0 Progress
 
soo, can you give us a date?
if not, can you tell us the progress of the progress(or you edit the frist post every time you progress:D )

seeya

Akz 22-10-2004 22:35

Re: 1.1 and 2.0 Progress
 
There haven't been much progress on GrogBot lately, because I've been busy with other projects. Can't give any release dates at the moment.

raaste 13-12-2004 23:03

Re: 1.1 and 2.0 Progress
 
Other projects, indeed. 9_9

stefanhendriks 22-12-2004 22:07

Re: 1.1 and 2.0 Progress
 
other projects, like what? ;)

Akz 22-12-2004 22:46

Re: 1.1 and 2.0 Progress
 
Quote:

Originally Posted by raaste
Other projects, indeed. 9_9

Quote:

Originally Posted by stefanhendriks
other projects, like what? ;)

Hey, you're making fun out of me, huh? :|
No, seriously, GrogBot was sort of frozen for months, had no motivation to continue. Mostly because I'm fed up with this old 1.x code (it's crap).
But now, I started working on 1.1 again and I can promise a release in january. After it's finished, I can start working hard on 2.0 (no more 1.x bullshit).

Some important information regarding GrogBot 2.0 tomorrow.

Pierre-Marie Baty 23-12-2004 03:21

Re: 1.1 and 2.0 Progress
 
w00t man, I missed their parrot attack from some time now :D
Will there be a parrot in PVK 2 ?

stefanhendriks 23-12-2004 09:59

Re: 1.1 and 2.0 Progress
 
rofl. I just thought of other projects... erm, well it was probably me, being tired, having odd thoughts ahum...
:D

anyway, w00t. Just start over and rewrite from scratch, is done quicker anyway then bugfixing old code imo...

Akz 23-12-2004 11:49

Re: 1.1 and 2.0 Progress
 
Some GrogBot 2.0 info


  • GBot 2.0 will most probably be a HL2 bot. Let's just hope that the server plugin interface will get a richer entity handling API soon.
  • It will be a multi-mod bot (PVK2, HL2DM...)
  • It may even become engine-independent, that would mean it could support a few HL1 mods too, for example. This is very questionable though.
  • I'm trying to make it much more realistic in movement and aiming than the old GrogBot was. The A* pathfinder allows some tactical pathfinding to be done. (The safest route for example)
This project will surely eat a lot of time and as I'm in the PVK2 team... Well, just don't expect any 2.0 releases soon. ;)

And yes, there surely will be a parrot in PVK2. 8D

Pierre-Marie Baty 23-12-2004 14:51

Re: 1.1 and 2.0 Progress
 
Yarrrrrrrrrrr! 8D

raaste 23-12-2004 20:04

Re: 1.1 and 2.0 Progress
 
Good luck with the grogbot2 (or what it is called?)! I hope you still have some time for other stuff. :) (plz don't get this wrong)

XenonFORT 02-03-2014 17:03

Re: 1.1 and 2.0 Progress
 
Hi there :).

I would humbly ask, for the 10th year anniversary of this awesome bot, how's going the development of the Grogbot 2.0?

More precisely the version for PVK2, which I'm still waiting to test :cyclops:. I suppose that there has been a lot of things to do back then, but seeing that back in 2008 there was some bots that did something in the map, I can't believe that all I managed to do back then and even now, is spawn some dummies present on the Source Engine.

So I humbly request, at least an info update about these bots, or those old beta files for them as I would really enjoy practicing with them or in co-op with other players.

I understand that some server hosters would try to add them to fake their numbers, but there are some clever things to combat that fake number (as forcing the number of bots on the server player number, not showing them on the player number at all, or forcing the [Bot] tag, etc).

Said all that, thanks for your time, and good luck in the future of PVK2!

Have fun, and see you in the game :punk:


All times are GMT +2. The time now is 04:58.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.