Topic: AI patch suggestion
einstein13 |
Posted at: 2014-04-29, 09:08
I have one question: are the changes merged to the main code? With which bzr version? I would like to test old and new AI and don't know how... (I hope it is not a stupid question) einstein13 |
GunChleoc |
Posted at: 2014-04-29, 10:24
You will have to get and compile Tibor's branch, because it will only be merged when it's done:
Busy indexing nil values Top Quote |
PkK |
Posted at: 2014-04-29, 15:59
Would your AI modificatons prevent the vineyard building rage (an empire AI building putting all its efort into building vineyards after a few hours)? See also https://wl.widelands.org/forum/topic/1484/ Philipp Top Quote |
Tibor Topic Opener |
Posted at: 2014-04-29, 17:31
Hi all, I will upload my latest changes to launchpad tonight so everybody will be able to test it. PkK: I tested it only with barbarians Top Quote |
Tibor Topic Opener |
Posted at: 2014-04-29, 21:20
revision 6962 just uploaded.
and further step should be the same as when compiling trunk. Top Quote |
einstein13 |
Posted at: 2014-04-29, 22:42
Ok, maybe I'am to stupid with my Ubuntu, but I can't compile it. Using the page: https://wl.widelands.org/wiki/BuildingWidelands/#the_fastest_way_to_build_widelands_terminal_use and your clues. After downloading and moving to the folder ~/tibor-ai/ trying to compile it by ./compile.sh Then the error accured: CMake Error at CMakeLists.txt:81 (message): Build-directory and source-directory are the same! How can I solve the problem? Sorry, but I really don't like Linux systems I don't understand them einstein13 |
Tibor Topic Opener |
Posted at: 2014-04-30, 05:15
Hi,
you just need to edit first two variables (directories) and once installed - you must get last line on console if succesfull, run widelands with /var/widelands/installed2904/bin/widelands (as example). The script can be put anywhere, as it is doing 'cd' Top Quote |
SirVer |
Posted at: 2014-04-30, 06:15
For profiling I recommend looking into http://goog-perftools.sourceforge.net/doc/cpu_profiler.html which is pretty useful and will give you more information about what you actually want (time spent in functions vs number of CPU cycles spend in functions). If you want to profile with valgrind, you have to use its callgrind tool. A tutorial that I always reference is this: http://matt.eifelle.com/2009/04/07/profiling-with-valgrind/ Top Quote |
Tibor Topic Opener |
Posted at: 2014-04-30, 19:39
Thanks, I haven't a time to test it but I will do in short time I believe... Top Quote |
Tibor Topic Opener |
Posted at: 2014-04-30, 19:45
I am far from being finished or satisfied with my modifications to AI, and I have not looked at this problem closer yet. But it would be trivial to code a crude solution like limiting count of the same buildings (f.e. 50 buildings of the type), or limiting proportion of buildings of the same type to all buildings, for example 'no new building of type x if count_of_x>count_of_all_buildings * 0.3' Top Quote |