Loading...
 

PogamutUT2004


Movement Primitives and Steering

Hello Everybody,

I am using Pogamut as part of my research about Machine Learning in games to imitate human behavior and now I am getting to know the environment by implementing a neural network to learn to run in a circle. I would like to ask two questions regarding movement primitives and steering in pogamut.

As far as I read, when we don't want to deal with the navigational points(nodes) there are three ways to navigate in a map.
Letting LocationToGo be the Location object holds the point we want to go, calls in logic():

1- getAct().act(new Move().setFirstLocation( LocationToGo ))
2- move.strafeTo(LocationToGo,LocationToGo)
3- pathExecutor.followPath( this.pathPlanner.computePath( info.getLocation(), LocationToGo));

My first question is that are there any other ways to move the bot to a particular point? probably one that we can incorporate velocity or amount of displacement(or maybe force) in one time?

My second question is about smoothness of the navigation. I am using a neural network that takes the current state of the player and outputs the next position he is upto.

call in logic():

if (!this.info.isMoving())
{
Location nextLoc= neuralNetworkFunct( info.getLocation());
move.strafeTo(nextLoc,nextLoc);
}

Using above method, as expected, the bot stops when he's making his decision. Is there a way or a function call to smooth the navigation by not letting the bot stop, but keep moving?

To illustrate my problem, I uploaded a 1 min video to youtube:
http://www.youtube.com/watch?NR=1&feature=endscreen&v=9AfTA1WnwOw

Thanks a lot in advance.

Hman.
Hi Hman, thanks for your questions!

1) Which version of Pogamut are you using? (check pom.xml file and parentPom version declaration)

2) We're about to release version 3.3.1, may be you should already switch to version 3.3.1-SNAPSHOT (devel version),
note that switching between Pogamut versions are just about rewriting mentioned declaration in pom.xml file
so it is easy to switch back if things go wrong for you ;-)

3) Are you working with UT2004 or Emohawk?

4) For UT2004 there is also module "navigation" and navigation.navigate(LocationToGo) and check navigation.isNavigating()

5) no, there is no simple way to smooth the movement due to inherent complexity of the problem ... its up to you
to recognize, that your bot is about to reach your target point and ask Pogamut to change its navigation to a different
location ... I'm about to start working on this topic to make this easier for developers, but there is probably no clean
solution for that as "next location to go to" is something you as developer has to provide or perhaps change or cancel,
so there is a lot of user logic involved and thus a lot of "customization" features must exist

Cheers!
And let us know how is your project going!

Jimmy
Hello Jimmy,

Thank you for your answer. I will inform you more as I progress :-). Following your order:

1-2) I am using the current version of pogamut 3.3.0 now. If it is possible to switch easily, I will do it. What are the differences between the current version and 3.3.1?

3-)I am working with UT 2004.

4-) I tried the navigation.navigate() with navigation.isNavigating() another cool movement function. So I believe now there is no function that incorporates velocity or force?

5-) I agree that the interruption here is inevitable, I need to find a trick to tackle that like reversing the logic and concentrating on the actions rather than the particular points to navigate to.

Thanks,

Cheers

hman
> Hello Everybody,
>
> I am using Pogamut as part of my research about Machine Learning in games to imitate human behavior and now I am getting to know the environment by implementing a neural network to learn to run in a circle. I would like to ask two questions regarding movement primitives and steering in pogamut.
>
> As far as I read, when we don't want to deal with the navigational points(nodes) there are three ways to navigate in a map.
> Letting LocationToGo be the Location object holds the point we want to go, calls in logic():
>
> 1- getAct().act(new Move().setFirstLocation( LocationToGo ))
> 2- move.strafeTo(LocationToGo,LocationToGo)
> 3- pathExecutor.followPath( this.pathPlanner.computePath( info.getLocation(), LocationToGo));
>
> My first question is that are there any other ways to move the bot to a particular point? probably one that we can incorporate velocity or amount of displacement(or maybe force) in one time?
>
> My second question is about smoothness of the navigation. I am using a neural network that takes the current state of the player and outputs the next position he is upto.
>
> call in logic():
>
> if (!this.info.isMoving())
> {
> Location nextLoc= neuralNetworkFunct( info.getLocation());
> move.strafeTo(nextLoc,nextLoc);
> }
>
> Using above method, as expected, the bot stops when he's making his decision. Is there a way or a function call to smooth the navigation by not letting the bot stop, but keep moving?
>
> To illustrate my problem, I uploaded a 1 min video to youtube:
> http://www.youtube.com/watch?NR=1&feature=endscreen&v=9AfTA1WnwOw
>
> Thanks a lot in advance.
>
> Hman.
Hi!

3.3.1 contains some improvements to navigation I think, one would have to run through SVN log to get complete picture, but the most severe change is that we've stopped exporting visibility
information for navigation points because it generated too much load on UT2004 side. So if you are not using NavPoint.isVisible() method, you should be safe switching to the snapshot.

Also to have the most recent version of GameBots2004, you would have to either download Nightly-build and install it from the installer or check it out from SVN for yourself (installer is more nice way ;-).

Cheers!
Jakub
Hello,

Thank you for the information on the update. I would like to ask one more question about the movement. Is there any movement function like strafeLeft or strafeRight for forward movement or movement according to body posture? That is, is there a movement function that moves the bot for a particular amount(like distance in strafe*() ) ?

Cheers,

Hman.
You can easily do something like that using Pogamut Move command:

Simple example of code that first moves the bot right, then left, then backwards:
int randomMoveDirection = 0;
	/**
	 * Last resort - keep trying random points 200 UT units from bot location - 90 degrees left, right and backwards. :-)
	 */
	protected void runSomewhere() {
		randomMoveDirection++;
		if (randomMoveDirection >= 2)
			randomMoveDirection = -1;
					
		Location backwardsLoc = bot.getLocation();
		
		Rotation rot = bot.getRotation();
		rot.setYaw(rot.getYaw() + randomMoveDirection * 16000);
		backwardsLoc = backwardsLoc.sub(rot.toLocation().getNormalized().scale(200));					
		
		double hDistance = bot.getLocation().getDistance2D(backwardsLoc);
		double vDistance = bot.getLocation().getDistanceZ(backwardsLoc);
		
		double angle = Math.atan(Math.abs(vDistance) / hDistance);		
		
		bot.getAct().act(new Move().setFirstLocation(backwardsLoc).setFocusLocation(bot.getLocation().add(bot.getRotation().toLocation().getNormalized().scale(500))));
	}


It is good to have some basics from linear algebra - you'll be using things like this more than often. :-)

best,
m
 

News

News RSS RSS feed for News link



Pogamut

Quarterly RSS RSS feed for quarterly reports

Acknowledgement

This work is supported by GA UK 1053/2007/A-INF/MFF (2007-8), GA UK 351/2006/A-INF/MFF (2006-8), the Ministry of Education of the Czech Republic (grant MSM0021620838) (2008-9), by the Program "Information Society" under project 1ET100300517 (2006-9), and the project Integration of IT Tools into Education of Humanities (2006-8) and by the project CZ.2.17/3.1.00/31162, which are financed by the European Social Fund, the state budget of the Czech Republic, and by the budget of Municipal House Prague.