Latest Posts

Topic: News about AI

Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-05-28, 15:13

@Nordfriese

How it goes? Do you have it installed?

If you are interested I have bunch of periodic maps, with various focus: enemies close/far, desert, scarce buildable spots, so when testing you can compare apples-to-apples. Most maps does not have equal starting positions and are for few players only...

postimage


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2017-05-29, 06:46

I have finally managed to get the branch compiled. My computer doesn´t accept the PPA, but I could fix the problem that prevented me from adding more swap. I´m on version bzr8137 now.

@GunChleoc: Thanks anyway for trying with the PPA

@Tibor: Thanks for the new output, it´s really helpful!

@WorldSaviour: I changed my preparations according to your new lists.

I do not have much time for testing today, but I´ll spend most of tomorrow letting my computer play Widelands. I will start by testing smaller maps (2-4 players) and then move on to larger and more complicated ones. I already created some very balanced and symmetrical maps for this purpose.


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-05-29, 07:41

I just fixed some issues related to attacking (there are some issues not related directly to AI, so workaround is needed) in bzr8139 so if you are interested in fighting, please upgrade


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-05-29, 09:54

Are these issues that should be fixed rather than have a workaround? Do we have a bug report for them?

Also, I am seeing some hard-coded values in that fix, and I'm wondering whether they can be automatically calculated.

Edited: 2017-05-29, 09:57

Busy indexing nil values

Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-05-29, 10:11

The issue is that AI keeps attacking an enemy site, but no soldiesr actually leave their military sites to fight. I dont know what is the issue. And the workaround was not to attack the same site too soon, The delays are arbitrary, can be longer/shorter, it will not make big difference.

I will consider the bug report.


Top Quote
PkK

Joined: 2012-01-06, 12:19
Posts: 236
Ranking
Widelands-Forum-Junkie
Posted at: 2017-05-29, 19:27

Tibor wrote:

PkK wrote:

That looks quite good. Unfortunately, I can do any testing for the next few weeks. But I definitely intend to look into it later (in particular with performance in trading outpost starting condition).

Philipp

No worry, we have plenty of time

Which branch should I use to help test AI? ai-post-b19?

Philipp


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-05-29, 20:01

ai-post-b19 definitely. The code is so different that testing the trunk is irrelevant now...


Top Quote
PkK

Joined: 2012-01-06, 12:19
Posts: 236
Ranking
Widelands-Forum-Junkie
Posted at: 2017-05-29, 20:49

I can't build ai-post-b19. Besides some warnings I also see errors:

/usr/bin/c++    -I../src -Isrc -isystem /usr/include/SDL2 -isystem /usr/include/GL -g    -std=c++11 -fext-numeric-literals  -g -DDEBUG -Wall -Wpedantic -Wdeprecated-declarations -Wextra -Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-include-dirs -Wno-undef -Wold-style-cast -Woverlength-strings -Wpacked -Wpointer-arith -Wredundant-decls -Wsign-promo -Wsync-nand -Wtrampolines -Wundef -Wunused -Wunused-macros -Werror=format-security -Werror=return-type -Werror=shadow -Werror=uninitialized -MD -MT src/ai/CMakeFiles/ai.dir/defaultai.cc.o -MF src/ai/CMakeFiles/ai.dir/defaultai.cc.o.d -o src/ai/CMakeFiles/ai.dir/defaultai.cc.o -c /home/philipp/widelands-ai-post-b19/src/ai/defaultai.cc
/home/philipp/widelands-ai-post-b19/src/ai/defaultai.cc: In member function ‘virtual void DefaultAI::think()’:
/home/philipp/widelands-ai-post-b19/src/ai/defaultai.cc:315:10: warning: enumeration value ‘kManagementUpdate’ not handled in switch [-Wswitch]
   switch (due_task) {
          ^
/home/philipp/widelands-ai-post-b19/src/ai/defaultai.cc: In member function ‘void DefaultAI::late_initialization()’:
/home/philipp/widelands-ai-post-b19/src/ai/defaultai.cc:497:6: error: ‘struct Widelands::BuildingObserver’ has no member named ‘stocklevel’; did you mean ‘stocklevel_time’?
   bo.stocklevel = 0;
      ^~~~~~~~~~
/home/philipp/widelands-ai-post-b19/src/ai/defaultai.cc:848:20: error: ‘struct Widelands::Player::AiPersistentState’ has no member named ‘ai_personality_military_loneliness’; did you mean ‘ai_personality_attack_margin’?
   persistent_data->ai_personality_military_loneliness = std::rand() % 5 * 30 - 60;

[…]

Philipp


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-05-29, 21:07

@Tibor: Are you sure you don't mean lp:~widelands-dev/widelands/ai-post-b19-2?


Busy indexing nil values

Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-05-29, 21:11

ooooooops , of course "*-2". I am going to delete branch "ai-post-b19" to avoid further confusion


Top Quote