Author Topic: AI work  (Read 5498 times)

discodowney

  • Guest
AI work
« on: 2 September 2010, 16:07:40 »
Hi,

Im doing my thesis on using a type of AI called SVM to control the AI in a RTS. Ive spent the last while trying to get Megaglest to work but i cant for the life of me get it to compile.

So Im just wondering if this is similar to that, in that i can change the AI code? Also what is the difference between GAE and Glest (or MegaGlest).

Cheers

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: AI work
« Reply #1 on: 3 September 2010, 02:47:57 »
Also what is the difference between GAE and Glest (or MegaGlest).
Well I asked softcoder...so here are some differences.
Code: [Select]
<ultifd> hey softcoder, what is the difference between GAE and MG again? one is that MG uses SDL and GAE uses Directsound right?
<softcoder> yes... but more
<softcoder> MG uses 90-95% same code for both linux and windows
<softcoder> SDL, OpenAL
<softcoder> where GAE uses Windows specific API's for Keyboard / mouse and sound
<softcoder> for windows binaries
<softcoder> also they changed many deps
<softcoder> like I think no more xerces but they use tinyxml
<softcoder> they also support things MG goes not yet like Physfs (virtual file systems... like reading files from ZIP files etc)
Edit: The other general differences is that megaglest greatly improves multiplayer, with some other new features, and that GAE basically has tons of features that are helpful for modding or gameplay, adds to the fun, etc...but the multiplayer is currently as good/bad as vanilla glest.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: AI work
« Reply #2 on: 3 September 2010, 06:21:57 »
Hi,

Im doing my thesis on using a type of AI called SVM to control the AI in a RTS. Ive spent the last while trying to get Megaglest to work but i cant for the life of me get it to compile.

So Im just wondering if this is similar to that, in that i can change the AI code? Also what is the difference between GAE and Glest (or MegaGlest).

Cheers

Greetings,

  The differences between MG and GAE are numerous, MG is basically Glest with some new stuff added and better multi-player, GAE has had lots of stuff added and been subjected to many architecture changes to accommodate the new features, future features, and for efficiency and multi-platform network play.

  From an AI developers perspective there is little difference, the AI in GAE is in need of a revamp to handle all the new features, and I am planning such a revamp, but was going to work on improving the multiplayer first, though I'm now thinking this will probably be decided by a poll.

  The current AI interface is not fantastic, if you do wish to work with GAE, I can provide any new functions/information your work requires, I have a thorough understanding of the engine and a generic A* engine just waiting to be turned loose on improved AI (it could fairly easily be setup to find ideal locations for defensive structures, walls, expansion locations, patrol routes, and much much more).

  I believe you are using windows, which comes with some added benefits while working with GAE, most notably we use pre-compiled headers which significantly improves compile times, and as Ultifd pointed out, we don't use SDL on windows, so the game initialises much faster too.

  If you've had problems getting MG to compile, you may first want to ensure GAE compiles for you, see first the compile guide,
http://sourceforge.net/apps/trac/glestae/wiki/CompileGuide

I've been meaning to add platform specific pages, but have not got around to that yet, if you hit any problems maybe check the following thread,
https://forum.megaglest.org/index.php?topic=5426.msg49033#msg49033

Which should hopefully get you up and running.

Cheers.

Glest Advanced Engine - Code Monkey

Timeline | Downloads

discodowney

  • Guest
Re: AI work
« Reply #3 on: 3 September 2010, 11:22:57 »
Okay Cheers man. Im gonna give GAE a go now and see if i can get it all up and running.

discodowney

  • Guest
Re: AI work
« Reply #4 on: 3 September 2010, 11:42:35 »
Ive downloaded the code into a folder called GAE.
The next part says to get the dependencies and extract them to trunk/deps. But i cant find a trunk folder in the code i downloaded. Am i supposed to add the trunk folder?

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: AI work
« Reply #5 on: 3 September 2010, 12:25:37 »
Actually, that's old information, from when we supplied project files in the source tree.  You can put them wherever you like, just remember where!

You need to set the GAE_WINDEPS variable in CMake to point at wherever you extracted them, it no longer matters where exactly they are.

Also, skip the downloading and building of wxWidgets... not needed for the game, and I put precompiled wx libs in the deps package anyway.

Wherever you see 'trunk' in that guide, it simply means where you checked out the source ('trunk' of the repository) to, in your case the folder you created called 'GAE'
Glest Advanced Engine - Code Monkey

Timeline | Downloads

discodowney

  • Guest
Re: AI work
« Reply #6 on: 3 September 2010, 12:45:54 »
Do you have to use CMake. There were instructions for VC projects, which i assumed was Visual C++. Am i wrong there. Ive never used Cmake before.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: AI work
« Reply #7 on: 3 September 2010, 12:59:18 »
Do you have to use CMake.
Yes.

Quote
There were instructions for VC projects, which i assumed was Visual C++. Am i wrong there. Ive never used Cmake before.
That was for the project files we used to have in the source tree, long since deleted (and good riddance, I hated maintaining those things!).
CMake is very easy to use once you get used to it, and generates VC project files for you.

Have a look over that other thread I pointed out if you are in a rush, otherwise wait, I'll update the compile guide and make a specific page for Windows users either tonight or tomorrow some time.

Cheers.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

discodowney

  • Guest
Re: AI work
« Reply #8 on: 3 September 2010, 13:17:46 »
Well im in a bit of a hurry, but i can definately wait a day or two.
Good man, Thanks
« Last Edit: 3 September 2010, 13:29:58 by discodowney »

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: AI work
« Reply #9 on: 5 September 2010, 02:27:25 »
The compile guide was updated yesterday, and I added a windows specific page with step-by-step instructions and plenty of pictures,

https://sourceforge.net/apps/trac/glestae/wiki/CompileGuideWin

Please let me know if you have any problems, or if you think something is unclear or erroneous.

Cheers.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: AI work
« Reply #10 on: 6 September 2010, 20:36:29 »
Nice guide  :thumbup: Seems to be clear.
Shall I just make that guide be the guide on the glest wiki too? I think there should be a compiling GAE for windows page or at least on the present page it should be updated... so should the guide be there too? The one there is old and not very helpful.
Code: [Select]
https://docs.megaglest.org/GAE/Compiling

discodowney

  • Guest
Re: AI work
« Reply #11 on: 7 September 2010, 12:19:06 »
Cheers for that. Gonna give it a shot now.

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: AI work
« Reply #12 on: 7 September 2010, 15:38:37 »
Nice guide  :thumbup: Seems to be clear.
Shall I just make that guide be the guide on the glest wiki too? I think there should be a compiling GAE for windows page or at least on the present page it should be updated... so should the guide be there too? The one there is old and not very helpful.
Code: [Select]
https://docs.megaglest.org/GAE/Compiling
Just link to the trac wiki. No need to duplicate.

@silnarm: Looks good. I'm also happy that the build scripts seem to work quite well on Mac too. Or did i miss some changes you made?
« Last Edit: 18 June 2016, 18:57:04 by filux »

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: AI work
« Reply #13 on: 7 September 2010, 22:28:31 »
Just link to the trac wiki. No need to duplicate.
Well, I would have done that if the old information was at least partially correct, but mainly I did not since it is kinda bad to point people to another website when wikia has a ad time if you are not logged in as a member. A lot of people are inpatient these days, or so it seems.
So here is the page... :-/ Now I guess we need to scrap the
Code: [Select]
[url=https://docs.megaglest.org/GAE/Compiling]old page [/url] later and make a page for linux compiling too...(that was old too)
At least now the "format" is identical to the MG part of the wiki. (pages) (also the info was duplicated too...)

I kinda wish I could try compiling on mac...but I don't have a mac, and pointless to emulate.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: AI work
« Reply #14 on: 8 September 2010, 04:55:31 »
@silnarm: Looks good. I'm also happy that the build scripts seem to work quite well on Mac too. Or did i miss some changes you made?

No, you didn't miss anything, works perfectly :thumbup:

...but mainly I did not since it is kinda bad to point people to another website when wikia has a ad time if you are not logged in as a member.

I just tried a couple of external links (and wasn't logged in) and was taken immediately to the other pages.

I'm perfectly happy for you duplicate the contents there if you like, but I only promise to keep 'our' wiki up to date. (I like the idea of accountability, you can only modify our trac wiki if you are a sourceforge member, and if you vandalise it, you wont be a sourceforge member for long!)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: AI work
« Reply #15 on: 8 September 2010, 22:12:48 »
I just tried a couple of external links (and wasn't logged in) and was taken immediately to the other pages.
It seems to be random now...just tried some links. 50/50. Well...as long as people keep the wiki compile guide updated, it should be fine then... also can I scrap the
Code: [Select]
[url=https://docs.megaglest.org/GAE/Compiling]old page[/url]?

Quote
I'm perfectly happy for you duplicate the contents there if you like, but I only promise to keep 'our' wiki up to date. (I like the idea of accountability, you can only modify our trac wiki if you are a sourceforge member, and if you vandalise it, you wont be a sourceforge member for long!)
I'll try my best to keep the, but when I don't have time, hopefully others will update...
Yeah, I figured that out yesterday, had an account.
Man...I wish there was some mirror thing. :-/

At least someone "used it" already/likes it.  :O
I'm very excited seeing the page: https://docs.megaglest.org/GAE/Linux_Compiling

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: AI work
« Reply #16 on: 9 September 2010, 01:15:09 »
I just tried a couple of external links (and wasn't logged in) and was taken immediately to the other pages.
It seems to be random now...just tried some links. 50/50. Well...as long as people keep the wiki compile guide updated, it should be fine then... also can I scrap the
Code: [Select]
[url=https://docs.megaglest.org/GAE/Compiling]old page[/url]?

Yeah, that would be nice, that's all old and completely wrong now ;)

Quote
I'll try my best to keep the, but when I don't have time, hopefully others will update...
Yeah, I figured that out yesterday, had an account.
Man...I wish there was some mirror thing. :-/

At least someone "used it" already/likes it.  :O
I'm very excited seeing the page: https://docs.megaglest.org/GAE/Linux_Compiling

Yeah, I may have to rethink my stance there, the glest wikia is a lot more visible than our trac wiki  :look:
« Last Edit: 18 June 2016, 18:55:19 by filux »
Glest Advanced Engine - Code Monkey

Timeline | Downloads

discodowney

  • Guest
Re: AI work
« Reply #17 on: 14 September 2010, 11:30:56 »
Hey,

So ive been trying to get this to work according to the guide silnarm made. But i cant. I put the problem on the CMake Mailing List, a trouble shooting thing, and they said there were some issues with 2008 express and Cmake so try 2010 as it works for them pretty good. So i did that and i get the exact same problem.

Im just wondering if there is anything that needs to be done in Viusal C++, some configuration or something, or should it just work straight from the moment VC++ is installed?

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: AI work
« Reply #18 on: 14 September 2010, 12:48:51 »
Hi discodowney,
I've updated the guide silnarm made in the last week or two with a couple of things that were missing. It might be worth having a look at it again if you haven't already.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: AI work
« Reply #19 on: 14 September 2010, 14:22:51 »
Hmmm... something is installed wrong.

I've re-created your directory structure and exported my working copy of trunk to the it, here's the build directory cmake generated (for VC++ 2008 express), extract the build directory to C:\Users\Downey\Documents\College\Masters\Gae
http://www.mediafire.com/download.php?s7i2b0c7ns1nurt

If that works, then the problem is not the compiler, if it doesn't work... I don't know, you may have to consider reinstalling windows :scared:
Glest Advanced Engine - Code Monkey

Timeline | Downloads

discodowney

  • Guest
Re: AI work
« Reply #20 on: 29 September 2010, 11:00:15 »
Hi. I got this working finally. It was my anti-virus software that was stopping CMake.

Back on track now. Ive run CMake. When i configure the window i get is slightly different to the one in the guide.
It says in the log

Could NOT find LibXml2  (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
Could NOT find Doxygen  (missing:  DOXYGEN_EXECUTABLE)

So they arent in the window as in the guide. Also it says in the guide to expane the GAE section. That doesnt exist either, but all the options within that are there so i can still ensure GAE_USE_PHYSFS & GAE_USE_PRECOMPILED_HDR are checked.

Ill keep going and hope the above changes dont affect me

EDIT: Its building now. Since im just gonna be focusing on the AI is it fine to get rid off all the subprojects bar glestadv and shared_lib?
« Last Edit: 29 September 2010, 11:27:24 by discodowney »

discodowney

  • Guest
Re: AI work
« Reply #21 on: 9 November 2010, 22:53:22 »
Hi,

I had to uninstall, well everything, on the laptop (long story) and im doing this again. And of course it hasnt gone smoothly. I have the code all checked out. Then i installed CMAKE. Ive downloaded the dependencies and unpackaged them all to gae-deps. Then i add the entry and make the path the path to gae-deps. When i try and configure i get (not a problem with my anti virus again):

Check for working CXX compiler using: Visual Studio 9 2008
Check for working CXX compiler using: Visual Studio 9 2008 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working C compiler using: Visual Studio 9 2008
Check for working C compiler using: Visual Studio 9 2008 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Looking for glob.h
Looking for glob.h - not found
Looking for sys/ioctl.h
Looking for sys/ioctl.h - not found
Looking for sys/filio.h
Looking for sys/filio.h - not found
Looking for sys/time.h
Looking for sys/time.h - not found
Looking for byteswap.h
Looking for byteswap.h - not found
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find Lua51 (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is
  at least version "5.1")
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindLua51.cmake:72 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:60 (find_package)

Configuring incomplete, errors occurred!

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: AI work
« Reply #22 on: 9 November 2010, 23:00:07 »
Hi, I think I had the same problem before... but the actual problem was that I downloaded the wrong deps...
delete your old deps folder, use this one (~4.2 MiB).
Delete cache, set GAE_WINDEPS, configure, configure, generate.
http://sourceforge.net/projects/glestae/files/win_dev_deps/windeps_base.zip/download
Make sure you are using this one, not the other one...

discodowney

  • Guest
Re: AI work
« Reply #23 on: 9 November 2010, 23:26:34 »
Not making any difference.

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: AI work
« Reply #24 on: 10 November 2010, 00:22:01 »
Do you really have include\lua.hpp and lib\lua5.1.lib in your deps folder and does GAE_WINDEPS contain an absolute path to this folder?

 

anything