.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > GrogBot
GrogBot A bot for Pirates, Vikings and Knights by Akz Pirates, Vikings and Knights

Reply
 
Thread Tools
1.1 and 2.0 Progress
Old
  (#1)
Akz
Creator of GrogBot
 
Akz's Avatar
 
Status: Offline
Posts: 91
Join Date: Jan 2004
Default 1.1 and 2.0 Progress - 18-09-2004

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"
  • 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.


GrogBot - A bot for Pirates, Vikings and Knights HL modification.

http://grogbot.bots-united.com

Last edited by Akz; 04-02-2005 at 15:00..
  
Reply With Quote
Re: 1.1 and 2.0 Progress
Old
  (#2)
AzShadow
Member
 
AzShadow's Avatar
 
Status: Offline
Posts: 17
Join Date: Feb 2004
Default Re: 1.1 and 2.0 Progress - 18-09-2004

I don't really understand the features in 1.1 but they're probably good.

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


owned! 8D
  
Reply With Quote
Re: 1.1 and 2.0 Progress
Old
  (#3)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: 1.1 and 2.0 Progress - 19-09-2004

good luck !



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: 1.1 and 2.0 Progress
Old
  (#4)
Ailean
Member
 
Ailean's Avatar
 
Status: Offline
Posts: 15
Join Date: Jun 2004
Default Re: 1.1 and 2.0 Progress - 20-09-2004

You're in the pvk2 team, so could you, eh :o , ... sneak a bot in the core? 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

And, I haven't paid attention to it yet, but some people told me all those grogbots speedhack ...
  
Reply With Quote
Re: 1.1 and 2.0 Progress
Old
  (#5)
Akz
Creator of GrogBot
 
Akz's Avatar
 
Status: Offline
Posts: 91
Join Date: Jan 2004
Default Re: 1.1 and 2.0 Progress - 20-09-2004

Quote:
Originally Posted by Ailean
You're in the pvk2 team, so could you, eh :o , ... sneak a bot in the core? 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.


GrogBot - A bot for Pirates, Vikings and Knights HL modification.

http://grogbot.bots-united.com
  
Reply With Quote
Re: 1.1 and 2.0 Progress
Old
  (#6)
Zeta
Member
 
Status: Offline
Posts: 20
Join Date: Jun 2004
Default Re: 1.1 and 2.0 Progress - 24-09-2004

I like the feature to command the bots and er what's a booty Tag mode?
  
Reply With Quote
Re: 1.1 and 2.0 Progress
Old
  (#7)
Akz
Creator of GrogBot
 
Akz's Avatar
 
Status: Offline
Posts: 91
Join Date: Jan 2004
Default Re: 1.1 and 2.0 Progress - 24-09-2004

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.


GrogBot - A bot for Pirates, Vikings and Knights HL modification.

http://grogbot.bots-united.com
  
Reply With Quote
Re: 1.1 and 2.0 Progress
Old
  (#8)
Akz
Creator of GrogBot
 
Akz's Avatar
 
Status: Offline
Posts: 91
Join Date: Jan 2004
Default Re: 1.1 and 2.0 Progress - 26-09-2004

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.


GrogBot - A bot for Pirates, Vikings and Knights HL modification.

http://grogbot.bots-united.com

Last edited by Akz; 02-11-2004 at 17:35..
  
Reply With Quote
Re: 1.1 and 2.0 Progress
Old
  (#9)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: 1.1 and 2.0 Progress - 27-09-2004

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!!!



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: 1.1 and 2.0 Progress
Old
  (#10)
elitejavi
Member
 
elitejavi's Avatar
 
Status: Offline
Posts: 118
Join Date: Aug 2004
Location: tucuman, argentina
Default Re: 1.1 and 2.0 Progress - 22-10-2004

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 )

seeya


if i wrote something wrong,its because i talk in spanish(argentina)unoficial spanish translator(want me to translate anything9_9?just ask! )

the life of a solider is really hard(the bazooka is heavy!)
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com