--- Log opened Fri Apr 10 00:00:55 2009 20090410 00:01:05< esr> ...and, you know, it occurs to me that no character on Irdya ought to be named "Jessica", either. Onless the Wesfolk have been having cultural exchanges wuth Earth. Must think upp a new name for her, too, 20090410 00:02:24< dfranke> esr: best commit message ever. 20090410 00:02:42< esr> :-) 20090410 00:09:02-!- Morian_ [i=romain@bezut.info] has quit [Read error: 110 (Connection timed out)] 20090410 00:09:12-!- wesbot changed the topic of #wesnoth-dev to: 1.6.1 planned for Sunday, April 12th, stringfreeze for branches/1.6 ! | Summer of Code info: http://www.wesnoth.org/wiki/SummerOfCodeIdeas | 53 bugs, 232 feature requests, 11 patches | logs: http://irclogs.wesnoth.org/ | Don't paste on IRC! Use a pastebin: http://wesnoth.pastebin.com | http://imagebin.org 20090410 00:10:13< Crab_> dfranke: I've just seen "die fould wesnothd bug die!!" as a commit msg, while looking through history ) 20090410 00:10:18< Rrenys> "Irdya" doesnt sound very welsh either. 20090410 00:10:50< Crab_> s/fould/foul 20090410 00:14:47-!- Sapient [n=sapien-x@c-71-204-10-166.hsd1.ga.comcast.net] has joined #wesnoth-dev 20090410 00:22:34< cjhopman> Ever wonder what a graph of the loaded wml structure would look like? check it out: http://pages.cs.wisc.edu/~hopman 20090410 00:22:39< cjhopman> warning: very large image 20090410 00:22:55< cjhopman> read some more at http://wesnoth.org/wiki/Cjhopman_wml#loaded_WML_structure_graphed 20090410 00:23:22< Crab_> cjhopman: which file ? 20090410 00:23:30< cjhopman> oh 20090410 00:23:49< Crab_> aha, found 20090410 00:23:50< cjhopman> http://pages.cs.wisc.edu/~hopman/out.png 20090410 00:24:57< cjhopman> gotta go now, later 20090410 00:25:00-!- cjhopman [n=chris@wesnoth/developer/cjhopman] has quit ["Konversation terminated!"] 20090410 00:28:29< fabi> esr: new version commited, please test. 20090410 00:29:48< esr> OK. 20090410 00:32:09-!- Azalit [n=Azalit@c-24-21-4-238.hsd1.or.comcast.net] has quit [Read error: 110 (Connection timed out)] 20090410 00:37:04< CIA-30> esr * r34655 /trunk/ (26 files in 4 dirs): Change the last Eearth-human name in mainline: Jessica -> Jessene. 20090410 00:37:58< esr> fabi: Testing. 20090410 00:43:09-!- Gnutoo [n=gnutoo@host155-29-dynamic.17-79-r.retail.telecomitalia.it] has quit [Remote closed the connection] 20090410 00:54:18-!- ryochan7 [n=ryochan7@173.9.238.161] has joined #wesnoth-dev 20090410 00:55:11-!- grzywacz [n=grzywacz@wesnoth/developer/grzywacz] has quit [Remote closed the connection] 20090410 01:02:38-!- molgrum_ [n=molgrum@c83-249-53-163.bredband.comhem.se] has quit [Read error: 104 (Connection reset by peer)] 20090410 01:02:46-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 01:06:35-!- oak_ [i=oakus@c02--112b.kn.vutbr.cz] has quit [Read error: 110 (Connection timed out)] 20090410 01:10:59-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 110 (Connection timed out)] 20090410 01:16:33-!- cjhopman [n=chris@wesnoth/developer/cjhopman] has joined #wesnoth-dev 20090410 01:17:27-!- loonycyborg [n=sergey@wesnoth/developer/loonycyborg] has quit ["Zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"] 20090410 01:18:40-!- Elvish_Pillager [n=eli@66-189-40-122.dhcp.oxfr.ma.charter.com] has quit [Read error: 110 (Connection timed out)] 20090410 01:18:42-!- loonybot [n=loonybot@wesnoth/bot/loonybot] has quit [Remote closed the connection] 20090410 01:18:58-!- Elvish_Pillager [n=eli@66-189-40-122.dhcp.oxfr.ma.charter.com] has joined #wesnoth-dev 20090410 01:21:09-!- happygrue [n=Wintermu@c-67-176-145-41.hsd1.in.comcast.net] has joined #wesnoth-dev 20090410 01:26:47-!- res|laptop [n=res@pdpc/supporter/student/res2k] has quit [Read error: 110 (Connection timed out)] 20090410 01:27:21-!- res|laptop [n=res@erft-4d07dbe3.pool.mediaWays.net] has joined #wesnoth-dev 20090410 01:29:16-!- Espreon [n=espreon@wesnoth/developer/espreon] has quit [Remote closed the connection] 20090410 01:35:49-!- ikarius [n=ross@smtp.gridironsystems.com] has quit [] 20090410 01:50:21< Crab_> Dragonking: around ? 20090410 01:50:30< Dragonking> Crab_: Yes? 20090410 01:53:21< Crab_> I intend to refactor current AI codebase in order to separate different ai-game interaction tasks to different classes. The first steps are minor, and won't touch client code much. I want to ask about the ai parts/ you're working on now, to avoid the 'merging problems'. 20090410 01:54:14< Crab_> (like what I did with ai lifecycle handling when I'd committed ai_manager - i had to change lookup code in a number of places) 20090410 01:54:37< Dragonking> Crab_: Hmm... for sure formula_ai.cpp will be tweaked by me 20090410 01:55:35< Dragonking> Besides that.. hard to tell 20090410 01:55:54< Dragonking> But I can postpone some changes to allow you to work without conflicts. 20090410 01:57:05< Crab_> Dragonking: I'll try to do so in small chunks, so just don't keep a 2000-line to-be-committed-patch in a local branch, and everything (I hope) will be ok. 20090410 01:57:23-!- [Relic] [n=[Relic]@adsl-76-229-202-137.dsl.milwwi.sbcglobal.net] has joined #wesnoth-dev 20090410 01:57:23< Dragonking> Crab_: Sounds like a good plan. :) 20090410 01:57:54< Crab_> Dragonking: for example, there may be situations where I'd have to make a minor change in 100 places at once. something like silene is doing with configs :) 20090410 01:58:07< Dragonking> Crab_: And if I wil step outside of formula_ai.cpp I can ask you if you're not about to commit something big. 20090410 01:58:20< [Relic]> Hello :) 20090410 01:58:26< Dragonking> hi [Relic] 20090410 01:58:29< Crab_> Dragonking: thanks 20090410 01:58:35< Dragonking> No problem. :) 20090410 01:58:50< Dragonking> I'm going to take some sleep now, bye :) 20090410 01:59:25< Crab_> bye ) 20090410 02:02:18< [Relic]> :) 20090410 02:03:13< Sapient> : 20090410 02:04:04< [Relic]> how'd you put your eyeballs in your mouth there? :) 20090410 02:04:53< Sapient> I'm wearing a ninja mask of invisibiliity 20090410 02:05:00< Sapient> you can only see my eyes : 20090410 02:05:35 * Sapient hides ; 20090410 02:07:53-!- Chusslove [n=caslav@brsg-d9befb89.pool.mediaWays.net] has quit [Read error: 110 (Connection timed out)] 20090410 02:22:04 * Shadow_Master blames YogiHH... 20090410 02:22:21< Shadow_Master> now Wesnoth (trunk) needs to say "the game has been saved" after saving a replay on end-of-scenario 20090410 02:22:29< Shadow_Master> that's so lame... 20090410 02:24:51-!- Sirp [n=me@wesnoth/developer/dave] has joined #wesnoth-dev 20090410 02:27:56-!- ikarius [n=ross@216.27.182.3] has joined #wesnoth-dev 20090410 02:41:58< Crab_> hello, Sirp. I'm starting a small refactoring of the ai-game interface, and I've got some questions. May I ask you some questions about turn_info class ? 20090410 02:44:24< Sirp> Crab_: you may... 20090410 02:44:45< Crab_> ok ) Current interaction of game and AI (in play_ai_turn) looks like this: http://wesnoth.pastebin.com/m487bd862 20090410 02:44:54< Crab_> Question 1. What is the purpose of turn_info ? 20090410 02:45:11< Crab_> Question 2: 2. What is the lifecycle of turn_info ? ( It is passed to ai constructor as part of ai_interface::info struct), and is not updated after that. So, I suppose that it can be created at any time, and remains valid for the duration of the game (for entire life of play_controller). Is this so ?) 20090410 02:45:15< Crab_> that's all ) 20090410 02:47:21-!- JW1 [n=X@c-71-57-85-168.hsd1.il.comcast.net] has quit [] 20090410 02:47:31-!- JW1 [n=X@c-71-57-85-168.hsd1.il.comcast.net] has joined #wesnoth-dev 20090410 02:47:40< Sirp> Crab_: turn_info is intended to hold all the information required to play through a turn in Wesnoth. It contains references to many of the game's important structures 20090410 02:47:44-!- happygrue [n=Wintermu@wesnoth/developer/wintermute] has quit ["http://xkcd.com/91/"] 20090410 02:47:57-!- happygrue [n=Wintermu@wesnoth/developer/wintermute] has joined #wesnoth-dev 20090410 02:48:02< Sirp> and it's created every turn, but all of its members are persistent over a longer time period. 20090410 02:48:47-!- Rrenys [n=rrenys@81-20-159-197.levira.ee] has quit [Read error: 104 (Connection reset by peer)] 20090410 02:49:34-!- res|laptop [n=res@pdpc/supporter/student/res2k] has quit [Read error: 110 (Connection timed out)] 20090410 02:49:40< Crab_> ok, (2) is answered. 20090410 02:50:20< Crab_> Sirp: about (1) - but it doesn't provide public accessors to that structures, and its public interface is more related to some kind of network sync... So, what is its purpose ? 20090410 02:52:25< Sirp> Crab_: ahh yes, sorry. It is responsible for sending/receiving data to the other clients. It will process network commands sent by other clients and will send all information about game moves to the other clients. 20090410 02:54:05< Crab_> Sirp: thanks. so, we need one copy of turn_info per side, and we need for it to be created at least once, and then we can keep it around till the end of the game ? 20090410 02:55:17< Crab_> clarification: s/at least once/at least once per side 20090410 02:56:05< Sirp> Crab_: I *think* it'd be okay to keep it around until the end of the game 20090410 02:58:06< Crab_> Sirp: ok ) thanks. That's all I need so far ) I'm asking because I want to proceed with my proposed refactoring plan of the 'ai' module (without changing actual ai behavior), and I am thinking about separating ai_interface:: responsibilities into different classes to make things simpler there. 20090410 02:58:37-!- tesa [n=tesa__@p5B2757DE.dip.t-dialin.net] has quit ["Verlassend"] 20090410 02:59:14< Crab_> So I just wanted to know what's in there and why :) Thanks. 20090410 03:00:25< Sirp> Crab_: sure, no problem. 20090410 03:00:34< Sirp> Crab_: it's been a while so I'm afraid I don't remember all the details. :) 20090410 03:02:57< Crab_> :) 20090410 03:13:05-!- Polarina [n=polarina@wesnoth/translator/Polarina] has quit ["Leaving."] 20090410 03:21:58-!- gabm [n=Gabriel@72.0.215.2] has joined #wesnoth-dev 20090410 03:29:37-!- happygrue [n=Wintermu@wesnoth/developer/wintermute] has quit [Remote closed the connection] 20090410 03:38:10-!- mjs-de [n=mjs-de@vpw.wh.uni-dortmund.de] has quit ["On the road again"] 20090410 03:38:27-!- turin [n=turin@168.215.250.1] has quit [Read error: 110 (Connection timed out)] 20090410 03:42:53-!- Espreon [n=chatzill@wesnoth/developer/espreon] has joined #wesnoth-dev 20090410 03:44:07-!- corn_ [n=cornmand@208.64.36.89] has joined #wesnoth-dev 20090410 03:44:25-!- corn [n=cornmand@208.64.36.76] has quit ["leaving"] 20090410 03:44:31-!- corn_ is now known as corn 20090410 03:46:36-!- Crab_ [n=Crab_@wesnoth/developer/crab] has quit ["Leaving."] 20090410 03:48:18-!- gabm [n=Gabriel@72.0.215.2] has left #wesnoth-dev [] 20090410 03:50:12< Turuk_> Sapient: Thanks for reminding JO about the Art Development forum. I offered it to him a while ago, I forgot to mention it again. 20090410 03:50:18-!- res|laptop [n=res@pdpc/supporter/student/res2k] has joined #wesnoth-dev 20090410 03:50:27< Sapient> hi Turuk 20090410 03:50:34< Sapient> no problem 20090410 03:50:40< Turuk_> Hello as well :) 20090410 03:51:04< res|laptop> Sirp: quick question; what are you using for heap usage profiling? valgrind's massif? 20090410 03:51:05< Turuk_> So used to leaving people messages, I forget the niceties at times. 20090410 03:51:29< Sapient> I am very aware how stupid comments from ungrateful forum critics can sap the artistic motivation 20090410 03:52:30-!- happygrue [n=Wintermu@wesnoth/developer/wintermute] has joined #wesnoth-dev 20090410 03:53:14< Sapient> So the Art Dev forum was created as a safe haven... downside being you don't get as much praise, either ;) 20090410 03:53:39< Sirp> res|laptop: nah, just printf-style debugging. 20090410 03:54:06< res|laptop> k... 20090410 03:56:12< Turuk_> Yeah, pros and cons of movement ;) 20090410 03:56:31< Turuk_> It takes a bit of a thick skin to be an artist sometimes 20090410 03:57:11< Elvish_Pillager> It can take a thick skin to be a drawer, anyway. 20090410 03:59:38-!- Blueblaze [n=nick@c-98-199-143-139.hsd1.tx.comcast.net] has joined #wesnoth-dev 20090410 04:01:01-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 60 (Operation timed out)] 20090410 04:07:33-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 04:08:27< CIA-30> shadowmaster * r34656 /trunk/data/campaigns/Delfadors_Memoirs/ (128 files in 16 dirs): 20090410 04:08:27< CIA-30> Adding campaign "Delfador's Memoirs" to mainline, from the Wesnoth-UMC-Dev repository, using revision 4429 from trunk. 20090410 04:08:27< CIA-30> This campaign is maintained by fabi/fendrin and esr. Some changes from the preimport revision at wesnoth-umc-dev: 20090410 04:08:27< CIA-30> * All @add-on paths have been converted to mainline campaign paths 20090410 04:08:30< CIA-30> * The external_binary_data directory has been removed and its contents are now at this campaign's main images dir. Those are referenced directly by WML for the campaign menu. 20090410 04:12:11-!- BenUrban [n=benurban@c-68-49-10-243.hsd1.md.comcast.net] has joined #wesnoth-dev 20090410 04:16:18< CIA-30> shadowmaster * r34657 /trunk/data/campaigns/Delfadors_Memoirs/ (64 files in 6 dirs): 20090410 04:16:18< CIA-30> Run the Wesnoth-UMC-Dev maintenance toolchain a last time as the correct SVN properties were lost due to the unversioned middle-step. 20090410 04:16:18< CIA-30> Fixed SVN properties on 64 files of 108. 20090410 04:21:46< CIA-30> shadowmaster * r34658 /trunk/data/campaigns/Delfadors_Memoirs/HISTORY: Prepend the full log summary from Wesnoth-UMC-Dev to the WesCamp-i18n log. 20090410 04:25:39-!- Elvish_Pillager [n=eli@66-189-40-122.dhcp.oxfr.ma.charter.com] has quit ["Hi! I'm a quit message virus vaccine. If you see a quit message virus, don't replace your quit message with it!"] 20090410 04:33:04-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Connection reset by peer] 20090410 04:33:19-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 04:36:15-!- happygrue [n=Wintermu@wesnoth/developer/wintermute] has quit [Read error: 110 (Connection timed out)] 20090410 04:37:11< CIA-30> shadowmaster * r34659 /trunk/ (RELEASE_NOTES changelog players_changelog): 20090410 04:37:11< CIA-30> Update changelogs and release notes for revision r34656 (adding DM to 20090410 04:37:11< CIA-30> mainline). 20090410 04:37:11< CIA-30> I didn't do it in that revision because my intermediate SVN copy didn't 20090410 04:37:11< CIA-30> have the changelogs. Oops. 20090410 04:39:52< CIA-30> esr * r34660 /trunk/data/campaigns/Delfadors_Memoirs/TODO: Update post-mainlining TODO list for Delfador's Memoirs. 20090410 04:44:29-!- Azalit [n=Azalit@c-24-21-4-238.hsd1.or.comcast.net] has joined #wesnoth-dev 20090410 04:49:49-!- Ivanovic_ [n=ivanovic@dtmd-4db26794.pool.einsundeins.de] has joined #wesnoth-dev 20090410 04:53:06-!- voris [n=voris@c-24-16-107-149.hsd1.wa.comcast.net] has joined #wesnoth-dev 20090410 04:53:36< CIA-30> esr * r34661 /trunk/data/campaigns/Delfadors_Memoirs/maps/leollyn.map: ShadowMaster suggested "Leollyn" should have deciduous forests. He's right. 20090410 04:57:54< CIA-30> dfranke * r34662 /branches/1.6/src/text.cpp: Port r34646 to 1.6 20090410 05:04:04-!- Appleman1234 [n=Appleman@131.181.47.1] has joined #wesnoth-dev 20090410 05:07:11-!- Ivanovic [n=ivanovic@wesnoth/developer/ivanovic] has quit [Read error: 113 (No route to host)] 20090410 05:07:47-!- Ivanovic_ is now known as Ivanovic 20090410 05:11:59-!- ilor [n=user@wesnoth/developer/ilor] has quit [Read error: 110 (Connection timed out)] 20090410 05:13:36< CIA-30> esr * r34663 /trunk/data/campaigns/Delfadors_Memoirs/ (TODO maps/new_ally.map maps/showdown.map): Map improvements along lines suggested by ShadowMaster. 20090410 05:17:32-!- Appleman1234 [n=Appleman@131.181.47.1] has quit ["Leaving"] 20090410 05:18:29-!- Azalit [n=Azalit@c-24-21-4-238.hsd1.or.comcast.net] has quit [" HydraIRC -> http://www.hydrairc.com <- It'll be on slashdot one day..."] 20090410 05:21:35-!- nerwa [n=nerwa@59.78.26.75] has joined #wesnoth-dev 20090410 05:22:51-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 104 (Connection reset by peer)] 20090410 05:23:05-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 05:24:53-!- Espreon [n=chatzill@wesnoth/developer/espreon] has quit ["ChatZilla 0.9.84 [Firefox 3.0.8/2009032609]"] 20090410 05:26:54< dfranke> is { delete NULL; } guaranteed to be harmless in all C++ implementations? 20090410 05:31:44< dfranke> (standard says yes, but I don't know if it's always followed) 20090410 05:34:19< Sapient> if you got a null pointer then delete is no-op 20090410 05:34:38< Sapient> so don't check if(x == NULL) 20090410 05:34:48< dfranke> k 20090410 05:34:49< Sapient> just delete it 20090410 05:35:08< Sapient> or better yet, use a smart pointer 20090410 05:35:17< Sapient> so it will delete itself 20090410 05:35:53< dfranke> I indeed wish the code used a lot more of those. 20090410 05:37:54< CIA-30> dfranke * r34664 / (4 files in 2 dirs): Fix another GUI memory leak 20090410 05:38:45-!- nerwa [n=nerwa@59.78.26.75] has quit [Read error: 110 (Connection timed out)] 20090410 05:40:17< dfranke> alright, and that polishes off all the output from yesterday's Valgrind session. 20090410 05:40:39< Sapient> nice 20090410 05:40:59< dfranke> at least, everything that was our fault. 20090410 05:41:33< dfranke> there a few points in cairo, pango, and X11 that I haven't looked over, but the ones I did look at were false positives. 20090410 05:45:21< Sapient> dfranke: hmm.. about help_button, that's weird 20090410 05:45:38< Sapient> it already has code to free the help_hand pointer in the leave() method 20090410 05:45:54< Sapient> so if leave() is never called that could indicate a seperate problem 20090410 05:46:30-!- DDR [n=chatzill@66.183.125.196] has joined #wesnoth-dev 20090410 05:46:40< dfranke> it isn't; there's no call to it anywhere in the code. 20090410 05:47:03< dfranke> but I don't think that's a bug. 20090410 05:47:09< Sapient> how are you so sure there' no call to it? 20090410 05:47:19< dfranke> I grepped for it. 20090410 05:47:32< dfranke> and set a breakpoint there to confirm at runtime. 20090410 05:47:43-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 05:48:08< Sapient> leave() is a virtual method from class events::handler 20090410 05:49:16< Sapient> it is called from the ~handler() destructor 20090410 05:49:16-!- res|laptop [n=res@pdpc/supporter/student/res2k] has quit [Read error: 104 (Connection reset by peer)] 20090410 05:52:07< Sapient> help_button inherits from gui::dialog_button which inherits from button which inherits from widget which inherits from handler 20090410 05:52:28< dfranke> yeah, just noticed that. 20090410 05:52:29< Sapient> so... I don't see why leave() would not be called 20090410 05:52:39< dfranke> I'm seeing if there's a destructor somewhere that needs to be virtual. 20090410 05:53:15< Sapient> the requirement of marking destructors virtual in C++ has always struck me as rather stupid 20090410 05:53:48-!- crimson_penguin [n=ben@wesnoth/developer/crimsonpenguin] has quit ["Leaving"] 20090410 05:54:06< Sapient> one of those language design choices I'll never agree with, I guess 20090410 05:54:59< dfranke> if among C++'s problems that one even comes up on your radar, then I think you have very strange taste in language design. 20090410 05:55:13-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Connection timed out] 20090410 05:55:47< Sapient> aye 20090410 05:57:08< Sapient> I also think the C++/C# style of using private rather than protected by default is wrong-headed 20090410 05:57:39< dfranke> yup... looks like there's no ~dialog_button(), virtual or otherwise. 20090410 05:58:17< Sapient> ok, please revert that last fix and put in the db destructor 20090410 05:58:45< dfranke> will do, but brb. 20090410 05:58:47-!- noy [n=Noy@d75-157-52-251.bchsia.telus.net] has joined #wesnoth-dev 20090410 05:58:48< Sapient> dfranke: I thought a destructor would be automatically generated if you didn't declare one? 20090410 05:59:12< dfranke> Sapient: I'm not a C++ language lawyer, but I think it gets generated non-virtual. 20090410 05:59:35< Sapient> right... 20090410 05:59:46< dfranke> anyway, I'll get to the bottom of it in gdb. 20090410 06:03:34< Sapient> I guess this means every widget needs a virtual destructor declared explicitly 20090410 06:03:36< cjhopman> if a base classes destructor is virtual, the inherited classes destructor is automatically virtual 20090410 06:04:40< Sapient> cjhopman: ah, so do you know why help_button::leave() would not be reached? 20090410 06:05:19< Sapient> maybe the button itself is never destructed 20090410 06:05:55-!- nerwa [n=nerwa@icis.sjtu.edu.cn] has joined #wesnoth-dev 20090410 06:06:25-!- res|laptop [n=res@erft-4d07fdef.pool.mediaWays.net] has joined #wesnoth-dev 20090410 06:07:26< cjhopman> oh, i don't think you can call virtual methods in destructors 20090410 06:07:28< Sirp> dfranke/ Sapient: not sure what the discussion is but if a class has a virtual function it should have a virtual destructor 20090410 06:07:30< cjhopman> or rather 20090410 06:07:37< cjhopman> it won't work as you expect 20090410 06:07:39< Sirp> and no you should not call virtual methods in destructors or constructors. 20090410 06:08:32< Sapient> well, shucks 20090410 06:09:12-!- wesbot changed the topic of #wesnoth-dev to: 1.6.1 planned for Sunday, April 12th, stringfreeze for branches/1.6 ! | Summer of Code info: http://www.wesnoth.org/wiki/SummerOfCodeIdeas | 52 bugs, 232 feature requests, 11 patches | logs: http://irclogs.wesnoth.org/ | Don't paste on IRC! Use a pastebin: http://wesnoth.pastebin.com | http://imagebin.org 20090410 06:09:21< Sapient> being unable to call virtual methods in destructors is going to make RAII-style cleanup impossible for event handlers 20090410 06:10:07< dfranke> what are the semantics if you do call them? 20090410 06:11:08< dfranke> do they get called as though the method were non-virtual? 20090410 06:11:19< cjhopman> not exactly 20090410 06:11:41< Sirp> dfranke: they get called as if the type of the object is the current class. 20090410 06:12:08< Sirp> i.e. if you have a C which is derived from a B which is derived from an A, in B's destructor, the C has already been destroyed, so the object is considered to be a B 20090410 06:12:14< dfranke> okay, that's consistent with the behavior I'm seeing. 20090410 06:12:42< Sirp> (and if the function is pure virtual and doesn't have a definition, well, have a guess at what happens. ;) 20090410 06:13:12< dfranke> I expect that'd be caught at compile time. 20090410 06:14:40< Sirp> well how can it? at least not in all cases 20090410 06:14:53< Sirp> if you call non-vritual function f which calls virtual function g in some cases... 20090410 06:15:11< Sirp> what happens, rather, is that the program crashes. 20090410 06:15:24-!- nerwa [n=nerwa@icis.sjtu.edu.cn] has quit [Remote closed the connection] 20090410 06:15:30< Sirp> though you actually *can* define a pure virtual function if you want 20090410 06:15:36< Sirp> and it will be called in cases such as this. 20090410 06:16:05< Sapient> I was aware of the restrictions against virtual function use in constructors but this is the first I'd heard about destructors sharing that restriction 20090410 06:17:03< dfranke> my original fix then, I guess, is as correct as it can be. 20090410 06:17:26-!- nerwa [n=nerwa@icis.sjtu.edu.cn] has joined #wesnoth-dev 20090410 06:17:27< Sapient> it looks like the only solution is to write a lot of destructors now 20090410 06:17:37< Sirp> Sapient: by the time B's destructor is called, all of C's members have been destroyed. You wouldn't want to call C's version of the function because it'd Do Bad Things. 20090410 06:18:40-!- nerwa [n=nerwa@icis.sjtu.edu.cn] has quit [Remote closed the connection] 20090410 06:19:22< Sapient> all of C's members hadn't been destroyed cause they'd been waiting for ~B to call on them though ;) 20090410 06:19:47< Sapient> I understand the rule now, though, thanks 20090410 06:20:41-!- nerwa [n=nerwa@icis.sjtu.edu.cn] has joined #wesnoth-dev 20090410 06:21:08< Sapient> is there some other idion for virtual initialize_stuff or virtual free_stuff methods? 20090410 06:22:04< dfranke> factory methods I guess. 20090410 06:23:03< Sirp> Sapient: pimpl. 20090410 06:24:44< Sapient> ah, yes... that extra layer of indirection would do the trick 20090410 06:25:04-!- Espreon [n=espreon@c-76-117-239-33.hsd1.pa.comcast.net] has joined #wesnoth-dev 20090410 06:25:04-!- Espreon [n=espreon@c-76-117-239-33.hsd1.pa.comcast.net] has quit [Client Quit] 20090410 06:25:10< Sapient> but probably more trouble than it's worth I guess 20090410 06:26:10-!- Espreon [n=espreon@c-76-117-239-33.hsd1.pa.comcast.net] has joined #wesnoth-dev 20090410 06:26:24< Sapient> especially since someone is already rewriting the widget library 20090410 06:28:53< dfranke> anyway, this leak was pretty small: 32 bytes each time you open the recruit dialog and possibly a couple others. 20090410 06:29:09< dfranke> the one I patched yesterday was big. 20090410 06:29:17< dfranke> 1460 bytes every time text is redrawn. 20090410 06:29:21< Sapient> it pains me that I introduced it, though. thanks for spotting that ;) 20090410 06:29:26< Sapient> cya later, have fun. 20090410 06:29:26-!- Sapient [n=sapien-x@wesnoth/developer/sapient] has left #wesnoth-dev [] 20090410 06:32:31-!- nerwa [n=nerwa@icis.sjtu.edu.cn] has quit [Remote closed the connection] 20090410 06:32:55< dfranke> I need to find a leak checker that's lighter-weight than valgrind. 20090410 06:33:14-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has quit [Connection reset by peer] 20090410 06:33:27< dfranke> I want to test the AI code for leaks, but in valgrind the overhead is too damn painful. 20090410 06:33:29-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 06:33:55< dfranke> Yesterday it took an hour to play through two turns of HttT. 20090410 06:35:54< dfranke> you shouldn't have to do full CPU emulation for that the way valgrind does; just replace malloc() and free() and then fan out from the stack like a conservative garbage collector. 20090410 06:37:10< cjhopman> dfranke: you can try google performance tools 20090410 06:37:27< cjhopman> that's what i've been using for profiling and i know they have a heapchecking tool too 20090410 06:37:33< cjhopman> i havent tried it though 20090410 06:38:51< dfranke> I'll give it a try. 20090410 06:39:59< cjhopman> if you are on a 64-bit system its kind of a pain though 20090410 06:40:03-!- Espreon [n=espreon@wesnoth/developer/espreon] has left #wesnoth-dev ["...z"] 20090410 06:40:24< dfranke> I am. Does it not support them? 20090410 06:40:41< cjhopman> it does... just requires something extra 20090410 06:40:52< cjhopman> libunwind 20090410 06:43:33-!- Espreon [n=espreon@wesnoth/developer/espreon] has joined #wesnoth-dev 20090410 06:45:26< CIA-30> esr * r34665 /trunk/data/campaigns/Delfadors_Memoirs/scenarios/18_a_new_ally.cfg: Punch up some dialog a little. 20090410 06:47:53-!- [Relic] [n=[Relic]@adsl-76-229-202-137.dsl.milwwi.sbcglobal.net] has quit ["Leaving"] 20090410 06:51:34-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 60 (Operation timed out)] 20090410 06:54:31< cjhopman> dfranke: I 20090410 06:54:51< cjhopman> I'm trying it now... it too is way slow :/ 20090410 06:58:05-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 07:14:57< dfranke> "WARNING: Perftools heap leak checker is active -- Performance may suffer" 20090410 07:15:03< dfranke> indeed so. 20090410 07:15:50< dfranke> still better than valgrind by a bit, though. 20090410 07:17:00-!- PK [n=pk@r74-192-44-206.vctrcmta01.vctatx.tl.dh.suddenlink.net] has joined #wesnoth-dev 20090410 07:17:15-!- PK [n=pk@r74-192-44-206.vctrcmta01.vctatx.tl.dh.suddenlink.net] has quit [Client Quit] 20090410 07:18:16-!- Sirp [n=me@wesnoth/developer/dave] has quit ["leaving"] 20090410 07:22:42-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 07:26:52< dfranke> ooh, looks like running in slow motion has turned up a deadlock. Investigating. 20090410 07:28:04< cjhopman> that might just be from tcmalloc :/ 20090410 07:28:15< cjhopman> or rather from the heap checker and tcmalloc 20090410 07:30:13-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Connection timed out] 20090410 07:31:03< dfranke> yup, looks like it :-( 20090410 07:31:25< dfranke> one thread is deadlocked in GetStackTrace() and the other in malloc(). 20090410 07:32:08< dfranke> well, that sucks. 20090410 07:33:52< cjhopman> libunwind is supposed to fix that :/ 20090410 07:43:02-!- ilor [n=user@wesnoth/developer/ilor] has joined #wesnoth-dev 20090410 07:44:58-!- PK [n=pk@r74-192-44-206.vctrcmta01.vctatx.tl.dh.suddenlink.net] has joined #wesnoth-dev 20090410 07:48:14-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 104 (Connection reset by peer)] 20090410 07:48:29-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 07:56:57< CIA-30> esr * r34666 /trunk/data/campaigns/Delfadors_Memoirs/_main.cfg: 20090410 07:56:57< CIA-30> Separate campaign grading from synopsis as in rest of mainline. 20090410 07:56:57< CIA-30> Add a credit. 20090410 07:59:27-!- PK [n=pk@r74-192-44-206.vctrcmta01.vctatx.tl.dh.suddenlink.net] has quit ["Java user signed off"] 20090410 08:04:29-!- mordante [i=57d7c91a@gateway/web/ajax/mibbit.com/x-408c7d175b1b3acc] has joined #wesnoth-dev 20090410 08:04:45< mordante> hi 20090410 08:06:28< mordante> Reisiger Ivanovic I know the cause of the MSVC errors, will fix them later 20090410 08:13:06-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 08:14:01< CIA-30> espreon * r34667 /trunk/data/campaigns/Delfadors_Memoirs/terrain.cfg: Made it so that the ethereal abyss terrain is actually assigned to DM's editor group. 20090410 08:20:34-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Connection timed out] 20090410 08:21:29-!- ikarius [n=ross@216.27.182.3] has quit [] 20090410 08:23:54-!- Appleman1234 [n=Appleman@131.181.47.1] has joined #wesnoth-dev 20090410 08:28:11< CIA-30> espreon * r34668 /trunk/data/campaigns/Delfadors_Memoirs/ (maps/portal.map terrain-graphics/_final.cfg terrain.cfg): Changed the ethereal abyss' terrain id so that it won't conflict with IFtU's inferno abyss in the editor. 20090410 08:34:58-!- mordante [i=57d7c91a@gateway/web/ajax/mibbit.com/x-408c7d175b1b3acc] has quit ["http://www.mibbit.com ajax IRC Client"] 20090410 08:42:40-!- Espreon [n=espreon@wesnoth/developer/espreon] has quit [Remote closed the connection] 20090410 08:43:56< dfranke> cjhopman: btw, did you mention at some point that you were planning to replace some of our STL structures with Google sparse_hash and dense_hash? 20090410 08:52:27< dfranke> so much for this program: 20090410 08:52:30< dfranke> dfranke@feanor:~/wesnoth/trunk$ LeakCheck ./wesnoth-debug 20090410 08:52:30< dfranke> Segmentation fault (core dumped) 20090410 08:52:35< dfranke> brillig. 20090410 08:54:06-!- DDR [n=chatzill@66.183.125.196] has quit ["ChatZilla 0.9.84 [Firefox 3.0.8/2009032609]"] 20090410 08:57:56< cjhopman> dfranke: not me. someone else on the forum suggested it. 20090410 08:59:12< dfranke> cjhopman: anyway, I've played with those libraries and they're pretty nice. 20090410 08:59:36< cjhopman> yeah, they looked like they might be useful 20090410 09:01:05-!- stikonas [n=stikonas@wesnoth/translator/stikonas] has joined #wesnoth-dev 20090410 09:02:37-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 104 (Connection reset by peer)] 20090410 09:02:52-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 09:07:43-!- nerwa [n=nerwa@icis.sjtu.edu.cn] has joined #wesnoth-dev 20090410 09:09:48-!- ettin [n=jorda@wesnoth/developer/ettin] has joined #wesnoth-dev 20090410 09:16:17-!- Appleman1234 [n=Appleman@131.181.47.1] has quit ["Leaving"] 20090410 09:18:24-!- oak_ [n=oakus@c02--112b.kn.vutbr.cz] has joined #wesnoth-dev 20090410 09:22:06-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 60 (Operation timed out)] 20090410 09:23:18-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 09:28:37-!- Blueblaze [n=nick@c-98-199-143-139.hsd1.tx.comcast.net] has quit [Remote closed the connection] 20090410 09:29:35-!- zookeeper [n=l@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20090410 09:39:12-!- nerwa [n=nerwa@icis.sjtu.edu.cn] has quit [Read error: 110 (Connection timed out)] 20090410 09:44:15-!- nerwa [n=nerwa@icis.sjtu.edu.cn] has joined #wesnoth-dev 20090410 09:46:25< dfranke> anyone around who understands the network_worker code? 20090410 09:46:38-!- nerwa [n=nerwa@icis.sjtu.edu.cn] has quit [] 20090410 09:52:50-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 104 (Connection reset by peer)] 20090410 09:53:04-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 10:16:31-!- noy [n=Noy@wesnoth/developer/noy] has quit ["GO, GET TO THE CHOPPAH!!!"] 20090410 10:19:38-!- Chusslove [n=caslav@brsg-d9bee5a1.pool.mediaWays.net] has joined #wesnoth-dev 20090410 10:33:02-!- ilor [n=user@wesnoth/developer/ilor] has quit [] 20090410 10:40:34-!- grzywacz [n=grzywacz@wesnoth/developer/grzywacz] has joined #wesnoth-dev 20090410 10:41:29< Ivanovic> dfranke: Soliton might have a good understanding of this part 20090410 10:41:43< Ivanovic> though i *think* (not sure at all) yogihh had a look at it some time ago, too 20090410 10:41:57< Ivanovic> and of course sirp could help you, no idea though when he will be around next 20090410 10:45:55-!- edb [n=edb@77.101.196-77.rev.gaoland.net] has joined #wesnoth-dev 20090410 10:46:01< fabi> hi 20090410 10:46:06-!- fabi is now known as fendrin 20090410 10:48:03-!- ilor [n=user@wesnoth/developer/ilor] has joined #wesnoth-dev 20090410 10:48:33< ilor> I'm off for Easter, be back around Monday 20090410 10:48:47-!- ilor [n=user@wesnoth/developer/ilor] has quit [Client Quit] 20090410 10:56:18-!- loonybot [n=loonybot@79.139.246.167] has joined #wesnoth-dev 20090410 10:56:53-!- loonycyborg [n=sergey@79.139.246.167] has joined #wesnoth-dev 20090410 11:00:39-!- voris [n=voris@c-24-16-107-149.hsd1.wa.comcast.net] has quit [Remote closed the connection] 20090410 11:01:42-!- edb [n=edb@77.101.196-77.rev.gaoland.net] has quit [Remote closed the connection] 20090410 11:02:29-!- Reisiger [n=Reisiger@adsl-89-217-6-44.adslplus.ch] has joined #wesnoth-dev 20090410 11:02:58< Reisiger> Good morning :) 20090410 11:16:08-!- zookeeper [n=l@wesnoth/developer/zookeeper] has quit [] 20090410 11:20:35-!- stikonas [n=stikonas@wesnoth/translator/stikonas] has quit [Read error: 104 (Connection reset by peer)] 20090410 11:21:46-!- busfahrer [n=busfahre@unixboard/user/busfahrer] has joined #wesnoth-dev 20090410 11:28:36-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Connection reset by peer] 20090410 11:28:51-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 11:45:26-!- Elvish_Pillager [n=eli@66-189-40-122.dhcp.oxfr.ma.charter.com] has joined #wesnoth-dev 20090410 12:06:54-!- Elvish_Pillager [n=eli@66-189-40-122.dhcp.oxfr.ma.charter.com] has quit [Read error: 110 (Connection timed out)] 20090410 12:07:35-!- Elvish_Pillager [n=eli@66-189-40-122.dhcp.oxfr.ma.charter.com] has joined #wesnoth-dev 20090410 12:11:36-!- busfahrer [n=busfahre@unixboard/user/busfahrer] has quit ["leaving"] 20090410 12:39:49-!- mordante [i=57d7c91a@gateway/web/ajax/mibbit.com/x-b0645774e1978dc0] has joined #wesnoth-dev 20090410 12:39:55< mordante> hi 20090410 12:41:00< Reisiger> wesbot log 34655 20090410 12:41:01< wesbot> esr * r34655 : Change the last Eearth-human name in mainline: Jessica -> Jessene. 20090410 12:41:04< wesbot> URL: http://svn.gna.org/viewcvs/wesnoth?view=rev&rev=34655 20090410 12:41:39< Reisiger> Good afternoon mordante. 20090410 12:41:53< mordante> hi Reisiger 20090410 12:42:07< mordante> Reisiger: can you test this patch with MSVC? http://paste.debian.net/33041 20090410 12:42:57-!- stikonas [n=stikonas@ctv-79-132-187-171.vinita.lt] has joined #wesnoth-dev 20090410 12:42:58< mordante> should fix the /W errors and disable fontconfig 20090410 12:44:24< Reisiger> ok. 20090410 12:45:16-!- Elvish_Pillager [n=eli@66-189-40-122.dhcp.oxfr.ma.charter.com] has quit ["Hi! I'm a quit message virus vaccine. If you see a quit message virus, don't replace your quit message with it!"] 20090410 12:45:45< Ivanovic> hi mordante 20090410 12:45:54< mordante> hi Ivanovic 20090410 12:46:03< Ivanovic> from where are you online today? 20090410 12:46:16< mordante> work 20090410 12:46:23< Ivanovic> ipv6, not logged in at nickserv, only in here, ... 20090410 12:46:24 * Reisiger slaps TortoiseSVN for having a hick-up with applying the patch 20090410 12:46:38< mordante> mibbit.com 20090410 12:46:46-!- Crab_ [n=Crab_@wesnoth/developer/crab] has joined #wesnoth-dev 20090410 12:46:47< Ivanovic> ah 20090410 12:46:59< Crab_> hi 20090410 12:47:08< mordante> and obviously I'm not going to type my password through their service ;-) 20090410 12:47:11< mordante> hi Crab_ 20090410 12:47:21< Ivanovic> :) 20090410 12:47:53< Reisiger> mordante: I'm having issues applying the patch... TortoiseSVN doesn't show anything when I tell it to apply the patch 20090410 12:48:09-!- Polarina [n=polarina@wesnoth/translator/Polarina] has joined #wesnoth-dev 20090410 12:48:20< mordante> oh yeah it can't apply -p1 patches :-/ 20090410 12:50:31< Reisiger> wesbot log 34654 20090410 12:50:32< wesbot> esr * r34654 : No undead menace should ever be named "Sam". 20090410 12:50:32< wesbot> URL: http://svn.gna.org/viewcvs/wesnoth?view=rev&rev=34654 20090410 12:50:39< mordante> Reisiger: here's the entire file http://paste.debian.net/33042 20090410 12:50:55< mordante> off to lunch now 20090410 12:50:56< Reisiger> ok 20090410 12:51:10< Reisiger> Enjoy :) Heading off for food myself... soon(TM) 20090410 12:52:50< Reisiger> mordante: No joy. Still the /W error. 20090410 12:53:41< Reisiger> http://wesnoth.pastebin.com/m2f12feec 20090410 12:54:55< Reisiger> I did rerun the configuration and the generate... will try with setting up all data in CMake after clearing the cache after lunch. 20090410 12:59:35< CIA-30> fendrin * r34669 /trunk/data/campaigns/Legend_of_Wesmere/utils/low-macros.cfg: Added a {SHAMANS} unit type list macro. 20090410 13:01:34< CIA-30> fendrin * r34670 /trunk/data/campaigns/Legend_of_Wesmere/scenarios/19_Costly_Revenge.cfg: Removed Cleodil and all shamans from the recall list. They refuse to help outwipeing the saurians. 20090410 13:01:48< Polarina> Oh no! 20090410 13:03:33< Dragonking> Crab_: I would like to commit something that alters ai.cpp and callable_object.[c|h]pp, are you tweaking any of these files atm? 20090410 13:06:12< Crab_> Dragonking: no, I'm tweaking ai_manager.?pp and ai_interface.hpp at the moment.. 20090410 13:06:34< Dragonking> ok 20090410 13:07:44< CIA-30> dragonking * r34671 /trunk/src/ (4 files): Improved the way how move maps work for formula_ai 20090410 13:08:14< CIA-30> fendrin * r34672 /trunk/data/campaigns/Legend_of_Wesmere/scenarios/19_Costly_Revenge.cfg: LoW 19: Fixed a bug in scenario 19. 20090410 13:12:45< Crab_> Dragonking: actually, if there's problems, one of us will still have to do the merge. It is just better to 'commit early', to decrease the changes of this happening. So, don't ask if 'I would like to commit something', its not that necessary, just try to commit earlier and in smaller chunks (So I will be able to rebase to revision including your changes earlier) 20090410 13:13:12< Dragonking> Crab_: ok! :) 20090410 13:13:37< CIA-30> dragonking * r34673 /branches/1.6/src/ (4 files): Ported r34671 to stable, since it fixes some improper behaviour 20090410 13:21:53-!- fendrin [n=fabi@wesnoth/developer/fendrin] has quit [Remote closed the connection] 20090410 13:22:44< mordante> Reisiger: I'm quite sure you'll need to clear the cache 20090410 13:24:48< Reisiger> mordante: Ok. Setting up all needed variables again :) 20090410 13:25:02< mordante> :-) 20090410 13:25:45< Reisiger> Bugger Pkg again... *goes off to find the variable name* 20090410 13:27:15< Crab_> Dragonking, and, just In case, I've set up a small wiki page with my 'current' work plans - http://www.wesnoth.org/wiki/AI_Refactoring2009Crab 20090410 13:28:17< Polarina> Crab_: Looks good. 20090410 13:28:19< Dragonking> Great :) 20090410 13:28:23-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 104 (Connection reset by peer)] 20090410 13:28:38-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 13:29:31< Crab_> Polarina: it's just "current" plans, first small steps towards world domination ) 20090410 13:29:52< Polarina> Crab_: Oh no! 20090410 13:32:00< Reisiger> mordante: PKG_CONFIG_EXECUTABLE = Path to the bin folder or the file itself? 20090410 13:33:56< mordante> the executable file 20090410 13:35:56< Reisiger> Won't compute... o_O 20090410 13:36:16< benetnash> Crab_: thanks for the timeofday_modifier method 20090410 13:36:34< Crab_> benetnash: np ) 20090410 13:37:50< Reisiger> mordante: CMake can't find the pkg-config.exe even if I give it the filepath... and set the PKG_CONFIG_FOUND bool to 1 20090410 13:38:32< benetnash> Crab_: If I write patch with method for reporting various attack statictics in FAI can you add it to trunk? (values in attacks variable are quite strange, they contains some weird values used by AI (i.e. avg_damage can be negative)) 20090410 13:40:30< Crab_> benetnash: better write a small *specification* explaining what data do you want to get, and why. And yes, if it is useful, I'll add it to trunk. 20090410 13:41:10< Crab_> benetnash: of course you may write a patch, too :) but without documentation it will be hard to check 'if you really got what you wanted' 20090410 13:42:01-!- Newell [i=d31b042e@gateway/web/ajax/mibbit.com/x-6616525b2e157f2e] has joined #wesnoth-dev 20090410 13:42:03< benetnash> Crab_: ok, today evening I'll prepare wiki page with my expectations 20090410 13:42:09< Crab_> benetnash: good) 20090410 13:42:56< benetnash> Crab_: or I'll try to make it on my own, Formula AI source code looks quite simple ;) 20090410 13:45:48< CIA-30> dragonking * r34674 /trunk/src/ (formula_ai.cpp formula_ai.hpp): Fixed bug in evaluate_for_position function 20090410 13:45:52< Crab_> benetnash: as you desire :) patches are welcome, but documentation is necessary - because we may want to incorporate your patch in a slightly different way 20090410 13:52:14-!- JonW1 [n=chatzill@cpc2-finc11-0-0-cust855.4-2.cable.virginmedia.com] has joined #wesnoth-dev 20090410 13:55:38< CIA-30> dragonking * r34675 /branches/1.6/src/ (formula_ai.cpp formula_ai.hpp): Ported r34674 to stable 20090410 13:59:14< CIA-30> esr * r34676 /trunk/data/campaigns/Delfadors_Memoirs/ (9 files in 2 dirs): Wire in the Tomb Guardian portrait. Also, some wmllint cleanups. 20090410 14:10:07-!- Netsplit verne.freenode.net <-> irc.freenode.net quits: Rhonda, Mellar, stikonas, Polarina, yann, JonW1, ABCD, jmunro[a], Chusslove, johani, (+34 more, use /NETSPLIT to show all of them) 20090410 14:10:34-!- Netsplit over, joins: Smar, benetnash 20090410 14:10:34-!- molgrum [n=molgrum@c83-249-53-163.bredband.comhem.se] has joined #wesnoth-dev 20090410 14:10:36-!- Netsplit over, joins: Turuk, Soliton, grzywacz, JW1, cjhopman, Dragonking, Shadow_Master, Ivanovic, Rhonda, JonW1 (+31 more) 20090410 14:16:19-!- JonW1 [n=chatzill@cpc2-finc11-0-0-cust855.4-2.cable.virginmedia.com] has quit ["ChatZilla 0.9.84 [Firefox 3.1b3/20090305152042]"] 20090410 14:16:54-!- boucman [n=rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20090410 14:17:14< boucman> hey all 20090410 14:17:20< mordante> hi boucman 20090410 14:17:39< Crab_> hi boucman 20090410 14:18:07-!- stikonas [n=stikonas@wesnoth/translator/stikonas] has quit [Read error: 60 (Operation timed out)] 20090410 14:21:41< Dragonking> hi boucman 20090410 14:21:57< Dragonking> boucman: I fixed this outcome/evaluate_for_position bug. 20090410 14:22:06< boucman> yes, I saw, thx a lot 20090410 14:23:56< Crab_> boucman, I've wanted to ask your opinion about porting parts of r34652 to branches. 20090410 14:24:11< boucman> wesbot: log 34652 20090410 14:24:12< wesbot> crab * r34652 : Fixed bug with AI leaders not always sharing keep when thay had the opportunity. 20090410 14:24:16< Crab_> There's two bugfixes in there: on Line 756, when calculating possible moves, the previous code discounted units with 0 move left, even when 'assume_full_movement' was set true.  and on Line 2134, ai leader previously shared keep only if he was able to move to 1st adjacent_tile to his keep. 20090410 14:24:17< wesbot> URL: http://svn.gna.org/viewcvs/wesnoth?view=rev&rev=34652 20090410 14:24:32< Crab_> (other stuff is esr's FR) 20090410 14:24:57< boucman> Crab_: hmm 20090410 14:25:24< boucman> please do not add the new passive_leader_share_keep option, backward compatibility issues 20090410 14:25:50< Crab_> boucman, yes, I am asking only about bug fixes. 20090410 14:26:11< boucman> ok, for the bug fixes, then 20090410 14:26:17 * boucman just checked the diff 20090410 14:26:42< Crab_> good 20090410 14:45:25< benetnash> Crab_: I wrote my ideas here http://www.wesnoth.org/wiki/FormulaAI_Ideas_Benetnash (not much ;) ) 20090410 14:45:33< Crab_> ok 20090410 14:53:48< Crab_> benetnash: please open src/attack_prediction.?pp 20090410 14:55:19< Crab_> and see the hp_dist field in there 20090410 14:58:09-!- Ambushsabre [n=ambushsa@c-75-67-216-121.hsd1.nh.comcast.net] has joined #wesnoth-dev 20090410 14:59:05< Reisiger> mordante: Is there a path variable needed for pangocairo in general? 20090410 14:59:13-!- Andylee [n=kvirc@188-23-3-44.adsl.highway.telekom.at] has joined #wesnoth-dev 20090410 14:59:15< Andylee> hi 20090410 14:59:21< Andylee> does anyone remember me? 20090410 14:59:46< Andylee> I am the poor guy who some of you provided with some sql help yesterday: :( 20090410 15:01:32< Crab_> benetnash: basically, if we provide a method which will return 2 "combatants" ("attacker" and "defender"), wil it be enough for your needs ? 20090410 15:02:44< Dragonking> Crab_: Something like in calculate_outcomes? 20090410 15:03:47< Crab_> Dragonking: yes 20090410 15:04:00< Dragonking> Crab_: I'm going to mess a bit with that function, to improve readability and filter possibilities 20090410 15:04:15< Crab_> see http://www.wesnoth.org/wiki/FormulaAI_Ideas_Benetnash for what he needs ) 20090410 15:04:24< Dragonking> I saw that :) 20090410 15:04:53< Dragonking> Generall attack prediction needs to be improved a bit 20090410 15:06:02< Crab_> what do you mean by 'general attack prediction' ? 20090410 15:06:08< Dragonking> Generally' 20090410 15:06:09< Dragonking> :) 20090410 15:06:19< Crab_> what is wrong with it ? 20090410 15:07:04< Dragonking> I meant attacks ai member, it could be more intuitive, outcomes combined with evaluat_for_position could be powerful but are only partly useful now 20090410 15:07:16< Crab_> ok, now I understand) 20090410 15:07:24< Dragonking> :) 20090410 15:11:00< Dragonking> benetnash: "Now it can be done with map(tomap(attacks), attack_value(ai, key))" I'd like to avoid adding more function to formula AI if something cna be achieved easily - and this can be IMHO, just need to write one def with function. 20090410 15:11:41< Crab_> Dragonking: yes, for me "map(tomap(attacks), attack_value(ai, key))" is fine, since nothing is repeated 20090410 15:12:07< Crab_> Dragonking: if(a, a, b) , on the other hand, is not fine. since a is repeated. 20090410 15:12:30< Crab_> so, it'll be evaluated 2 times.. 20090410 15:12:34< Dragonking> Crab_: If you write it like if(a, a, b) where a = .. there is no problem since a is evaluated only once. 20090410 15:12:35< benetnash> Crab_: but if(a, a, b) where a = foo is fine 20090410 15:12:55< benetnash> Crab_: I'll take a look into src/attack_prediction.* and answer you in a while 20090410 15:13:00< Dragonking> benetnash: def coalesce(... ) ; ;) 20090410 15:14:25< benetnash> Dragonking: yes, this is my next idea ;) In ai/formula/ there can be file macros.fai with make_map, coalesce and misc macros for other users 20090410 15:14:50< benetnash> or just wiki page with such hacks 20090410 15:14:55-!- yann [n=dwitch@nan92-1-81-57-214-146.fbx.proxad.net] has quit [Read error: 110 (Connection timed out)] 20090410 15:15:19< Dragonking> benetnash: One of our ideas is to add some faifile with common functions like that. 20090410 15:16:18< Dragonking> benetnash: Feel free to add site with some "neat" formula functions. :) 20090410 15:16:27< Dragonking> s/site/wiki site/ 20090410 15:17:07< Crab_> benetnash: and remember that run_file adds 'defs' to the formula function table of current ai 20090410 15:17:32< Crab_> benetnash: so you can use it like 'include' (but only once per ai :) ) 20090410 15:18:45< Dragonking> You can also just include faifiles into other failfiles via { } 20090410 15:21:09< benetnash> Ok, I'll create such page. Thanks for your help 20090410 15:21:36-!- Morian [i=romain@bezut.info] has quit ["Leaving"] 20090410 15:30:18< boucman> one "high level" (i.e AI specific) formula I would like would be "move a given unit to second line" i.e a hex that is close to the fight but should not normally be reached by ennemy units 20090410 15:30:33< boucman> to move berserkers and healers that are not required at this turn 20090410 15:30:44< Crab_> boucman: maybe just expose power_projection to .fai ? 20090410 15:31:26< boucman> Crab_: that would not exactly be power projection, but it would be a "semantic wrapper" from power projection to an actual move 20090410 15:31:41< boucman> but yes, if attack_projection was exposed it would be way simpler to write 20090410 15:33:28< boucman> Crab_: how hard would it be to do a fallback_once (or add a param to fallback) to have the C++ AI only play one unit and then come back to formula AI ? 20090410 15:33:55< Crab_> boucman: regarding "move a given unit to second line", there's two different ideologies to do that: 1) just expose power_projection and make certain candidate moves take it into account 2) do it as an a *action-formula* as you suggest (a "semantic wrapper" from power projection to an actual move) 20090410 15:34:13< Crab_> boucman: this is easy 20090410 15:34:50< boucman> Crab_: cool :) 20090410 15:35:29< boucman> back to power projection, the point was to have a formula for a common behaviour in a FAI library, not a new type of candidate move (though I'm not sure I understood what you mean) 20090410 15:35:30< Crab_> we just need to add a 'filter' into ai::do_move(), to make it condider only a subset of all possible moves 20090410 15:36:10< Crab_> boucman: I'm just talking that there's two ways to make a unit move: ask the ai to ask the game to move it, and suggest that moving this unit is *good candidate move*. 20090410 15:37:29< boucman> Crab_: I think you misunderstood my idea, could you explain my own idea to me, so I make sure we understand each other ? 20090410 15:38:13< Crab_> "make a formula that will take a unit and immediately move it to a 'safe enough' location on the battlefield" 20090410 15:38:27< Crab_> but not too far 20090410 15:39:37< boucman> ok, we agree :) 20090410 15:39:50< Crab_> this is what I call a "action formula" - it changes the state of the game 20090410 15:39:57< Crab_> this is a valid approach. 20090410 15:40:03< boucman> but my idea was to have a function (i.e a def) that would be used as a move in a register_candidate_move 20090410 15:40:24< boucman> not a new function or call to the engine 20090410 15:40:39-!- BenUrban [n=benurban@unaffiliated/benurban] has quit ["Power failu"] 20090410 15:40:53< boucman> since there is some "AI decision taking" I don't want to wire it in the engien 20090410 15:40:59< CIA-30> ivanovic * r34679 /branches/1.6/po/ (9 files in 9 dirs): updated Chinese (Simplified) and Czech translation 20090410 15:41:01< CIA-30> ivanovic * r34678 /trunk/po/ (10 files in 10 dirs): updated Chinese (Simplified) and Czech translation 20090410 15:41:11< Crab_> boucman: there is already lots of decision taking in the engine. 20090410 15:41:18< boucman> however, wanting to do that is a common enough action that I think it needs to be put in some sort of AI function library 20090410 15:41:27< benetnash> hey, why division by zero craches whole fai script? if(e, 'ok', 'div by zero') where e = 0/0 always return null 20090410 15:41:35< boucman> Crab_: which decisions ? 20090410 15:42:47< Crab_> boucman: many small decisions. attack evaluation, for example, considers the effect of poison to be "2 turns of poison". nearest_keep, for example, is used as a decision where-to-move 20090410 15:43:11< boucman> ok 20090410 15:43:19< boucman> but that's not a reason to add more :P 20090410 15:43:48< Crab_> yes. I have already started to 'separate' all those responsibilities into different c++ classes to make things simpler.... 20090410 15:43:58< benetnash> I've described tomap(map(...)) on page http://www.wesnoth.org/wiki/FormulaAI_Tips 20090410 15:44:15< Crab_> for example, I want to strictly separate those things that change the state of the game and those things which not. 20090410 15:44:29-!- loonybot [n=loonybot@wesnoth/bot/loonybot] has quit [Read error: 110 (Connection timed out)] 20090410 15:44:49-!- loonycyborg [n=sergey@wesnoth/developer/loonycyborg] has quit [Read error: 110 (Connection timed out)] 20090410 15:44:59< Crab_> this will allow to move all error-checking to a separate "ai-game integration layer", and will allow us to make the game state mostly-read-only to the ai (except through the controlled interface) 20090410 15:45:17< Crab_> this will make certain classes of bugs impossible. 20090410 15:46:00< mordante> Reisiger: not sure whether it's needed 20090410 15:46:46< Crab_> as now there's 'interesting' code in the AI such as 'second.set_movement(-1);' in the ai (which sets the move to 0, since unit.cpp is not so stupid) 20090410 15:47:07< Reisiger> Well... I tried adding the variable for the executable as filepath and as path (one time into the bin folder, the other time into the general directory of my pangocairo folder) 20090410 15:47:27< Reisiger> I can't get it to recognize the config exe :( 20090410 15:47:33 * boucman checks the new "if" syntax 20090410 15:51:09< mordante> :-( 20090410 15:53:02-!- molgrum [n=molgrum@c83-249-53-163.bredband.comhem.se] has quit [Read error: 104 (Connection reset by peer)] 20090410 15:53:09-!- molgrum [n=molgrum@c83-249-53-163.bredband.comhem.se] has joined #wesnoth-dev 20090410 15:57:22-!- loonybot [n=loonybot@94.29.26.244] has joined #wesnoth-dev 20090410 15:57:34< benetnash> Crab_: I think, that combatant structure is quite good for processing inside Formula AI but only if hp_dist is map (hp -> probability). 20090410 15:58:04-!- loonycyborg [n=sergey@94.29.26.244] has joined #wesnoth-dev 20090410 15:58:19< benetnash> Crab_: vector where n-th row is probability of haveing n live after fight IMO is hard to process in FAI. I have no idea how to get avg damage from such vector. 20090410 15:58:37< Crab_> benetnash: you don't have to. there's already 'avg hp left' 20090410 15:59:03< Crab_> benetnash: see actions.cpp, bool battle_context::better_combat 20090410 15:59:16< Crab_> it is simple example of comparing one combat to another 20090410 16:00:12< Crab_> also note that hp_dist[0] is 'chance to kill' 20090410 16:02:32< boucman> Dragonking: thanks to the new syntax, it makes FAI so much more readable... 20090410 16:03:14< Dragonking> boucman: ?? 20090410 16:03:26< boucman> the new if syntax 20090410 16:03:32< Dragonking> Ah, that. :) 20090410 16:03:37< boucman> i am rewriting velory's poison evaluation using it 20090410 16:03:50< Dragonking> Great :) 20090410 16:05:09< benetnash> Crab_: ok, so interface for accessing combatant structure would be great in fai ;) 20090410 16:07:10< Crab_> benetnash: what is better: '2 combatants' (you need attacker, defender, attacker_position, weapon of attacker) or map 'attack used -> 2 combatants per attack' (you need attacker,defender, attacker_position) 20090410 16:09:11< Dragonking> Crab_: I think latter one, allows to choose better attack with such syntax easily. (If I understoof you properly) 20090410 16:09:28< Crab_> yes, you're right 20090410 16:10:07< Crab_> let's see what's the opinion of benetnash ) 20090410 16:10:28< benetnash> Crab_: but add additional field is_preferred or something to nofity AI that this weapon is default 20090410 16:10:42< benetnash> Crab_: I agree with Dragonking 20090410 16:11:04< Crab_> benetnash: well, there's no 'default weapon' ) 20090410 16:11:21< benetnash> Crab_: you know, preferred by AI in current situation 20090410 16:11:35< Crab_> benetnash: c++ ai uses that 'better_combat' part ) 20090410 16:11:58< Crab_> benetnash: to find out what weapon is 'best' 20090410 16:13:33< Crab_> benetnash: there, weapon = argmax( combat_evaluation(attacker,defender, weapon) ) , over all possible weapons of attacker. 20090410 16:14:48< benetnash> my AI will be quite simple and to decrease computation effort I assumed, that there will be no wepon choosing, just using that ,,default'' so I need to see what weapon default AI would choose 20090410 16:15:42< Crab_> why do you want to see 'what weapon the default ai would choose' if you just want to use it ? 20090410 16:16:46< benetnash> i don't understand that. I don't want to choose weapon at all, just using attack(src, dst, target). 20090410 16:17:09< CIA-30> boucman * r34680 /trunk/data/ai/formula/poisoner_eval.fai: improve readability of poisoner_eval with the new if syntax 20090410 16:17:17< benetnash> but then with map 'attack used -> 2 combatants per attack' I need to know what weapon will be used in that attack 20090410 16:17:48< Crab_> benetnash, so, if you don't want to choose weapon at all, maybe something like "get_best_attack_details - return '2 combatants' from (attacker, defender, attacker_position), using best weapon" is all you need ? 20090410 16:18:10-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 104 (Connection reset by peer)] 20090410 16:18:20< benetnash> Crab_: I think so 20090410 16:18:25-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 16:19:14< Crab_> benetnash: if you don't care about the weapon used, you don't need a map weapon->pair_of_combatants, you'd just want the *best for attacker* pair_of_combatants (using default C++ definition of *best*) 20090410 16:19:49< Dragonking> In that case you just want to have improved 'attacks' stats, I think... 20090410 16:20:31< Crab_> Dragonking: yes, you are right. if the AI doesn't want to select best weapon, all is simplier, since less details are to be exposed 20090410 16:20:51< Dragonking> Yup. 20090410 16:21:38< benetnash> but why exposing details is wrong? I that every possible information should be available for the creator of AI 20090410 16:22:07< Crab_> benetnash: because formulas are the *interface*. 20090410 16:22:12-!- Rrenys [n=rrenys@81-20-159-197.levira.ee] has joined #wesnoth-dev 20090410 16:22:15< benetnash> anyway for me even method attack_stats(attacker, defender, attacker_position) or just extended attacks variable is fine 20090410 16:22:16< Crab_> benetnash: they are public, once we'd documented them 20090410 16:22:33< Crab_> benetnash: and if we expose and document something, deprecating it isn't easy 20090410 16:22:44< benetnash> Crab_: ok, I see 20090410 16:23:01< Crab_> benetnash: so, it's better to expose 'on need-to-know' basic 20090410 16:24:03< benetnash> Crab_: and then some developers like me will annoy you to expose some more ;) 20090410 16:24:06< Dragonking> benetnash: What you ask for is calcualte_outcoms 20090410 16:24:20< Dragonking> Output just needto be improved. 20090410 16:25:40< Crab_> Dragonking, something like: both for attacker and defender: average_hp,%poisoned,%slowed,%untouched,map(hp->%). all rounded down. 20090410 16:26:16< Dragonking> Crab_: aveare-stuff should be part of 'attacks' 20090410 16:26:17< Crab_> Dragonking: taken straight from combatant attacker and combatant defender... 20090410 16:26:36< Dragonking> calculate_outcomes should give % chances for different outcomes ot occure, and list stats for each of those 20090410 16:26:42< Dragonking> tHAT'S MY OPINION 20090410 16:26:46< Dragonking> Sry, cpas 20090410 16:26:48< Dragonking> caps' 20090410 16:27:16< Crab_> Dragonking: that's harder to do 20090410 16:27:17-!- Ambushsabre [n=ambushsa@c-75-67-216-121.hsd1.nh.comcast.net] has quit [Read error: 110 (Connection timed out)] 20090410 16:27:34< Dragonking> Crab_: Well, it partially works 20090410 16:27:43< Crab_> *partially* is the key here ) 20090410 16:27:43-!- mordante [i=57d7c91a@gateway/web/ajax/mibbit.com/x-b0645774e1978dc0] has quit ["http://www.mibbit.com ajax IRC Client"] 20090410 16:27:58< Dragonking> So we need to fix it. :) 20090410 16:28:38< Crab_> yes. 20090410 16:29:10< Crab_> and it needs to be a C++ function first 20090410 16:29:43< Crab_> so it may be used both by .fai (exposed as a formula) and default_ai 20090410 16:29:55-!- euschn [n=chatzill@85-127-110-115.dynamic.xdsl-line.inode.at] has joined #wesnoth-dev 20090410 16:30:06< euschn> hi 20090410 16:30:41< Polarina> Hello. 20090410 16:32:11-!- stikonas [n=stikonas@wesnoth/translator/stikonas] has joined #wesnoth-dev 20090410 16:33:30< benetnash> Dragonking: well. Now i see, that I can do everything on my own and I don't need any new function 20090410 16:33:32< Polarina> Hello, stikonas. :) 20090410 16:33:41< benetnash> hp_dist can be extracted using: 20090410 16:33:59< benetnash> debug_print(tomap(o[0].hitpoints_left, o[0].probability)) where o = calculate_outcome(loc(13,17), loc(13,17), loc(14,17)) 20090410 16:34:26< stikonas> Hi, Polarina 20090410 16:34:37< Polarina> stikonas: Which language do you translate? 20090410 16:34:50< stikonas> Lithuanian, since version 1.3.2 20090410 16:39:32< Crab_> benetnash: not quite so.. 20090410 16:42:08< Crab_> benetnash: but close enough 20090410 16:44:51< Crab_> benetnash: I (personally), do not trust calculate_outcome_function ) 20090410 16:45:03< benetnash> I find it useful enough so don't bother yourself with creating new methods. I bet you have more intresting things to do 20090410 16:45:06< benetnash> why? 20090410 16:46:26< Crab_> benetnash: one of the things that you should note that it doesn't give you what its name says. 20090410 16:47:06< Crab_> benetnash: it gives you hp/state distribution of the attacker and defender, separately 20090410 16:47:22< Crab_> benetnash: but hp/state distribution of attacker and defender are correlated 20090410 16:48:05< Crab_> benetnash: it is ok, but it is not *outcomes* that it gives you ) 20090410 16:48:44< benetnash> Crab_: I think I don't need so complex data, that two distributions are enough for me 20090410 16:48:51< Crab_> benetnash: ok ) 20090410 16:50:20< Crab_> benetnash: btw, it is easy to add average weighted hp left to it 20090410 16:51:07< Crab_> and make it write "%-chances" of poisoning and slowing 20090410 16:52:58< benetnash> Crab_: yes, sum(map(...), key*value)) will give avg health left 20090410 16:53:57< Crab_> benetnash: yes. but with a caveat :) will you take healing into account ? 20090410 16:54:29< Crab_> if "no", then sum(map(...), key*value)) is ok. 20090410 16:55:20< Crab_> see combatant::average_hp in src/attack_prediction.cpp 20090410 16:58:11< benetnash> Crab_: no, I do not consider healing for simplicity 20090410 16:58:24< Crab_> ok ) 20090410 17:01:41-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 60 (Operation timed out)] 20090410 17:09:01-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 17:12:34-!- crimson_penguin [n=ben@64.201.60.216] has joined #wesnoth-dev 20090410 17:13:42-!- oak_ [n=oakus@c02--112b.kn.vutbr.cz] has quit ["( www.nnscript.de :: NoNameScript 4.02 :: www.XLhost.de )"] 20090410 17:14:37-!- ryochan7 [n=ryochan7@173.9.238.161] has quit ["Leaving"] 20090410 17:15:17-!- ikarius [n=ross@smtp.gridironsystems.com] has joined #wesnoth-dev 20090410 17:29:11< Dragonking> boucman: Around? 20090410 17:39:40-!- Elvish_Pillager [n=eli@66-189-40-122.dhcp.oxfr.ma.charter.com] has joined #wesnoth-dev 20090410 17:45:42< boucman> Dragonking: back (reading the backlog right now) 20090410 17:48:30< boucman> ok, finished reading 20090410 17:53:32-!- Psyche^ [n=Psyche@d121113.adsl.hansenet.de] has joined #wesnoth-dev 20090410 17:57:05< Dragonking> boucman: I would liek to tweak velory's poisoning eval a bit 20090410 17:57:31< boucman> yes, well, do so :) 20090410 17:57:36< boucman> in what way ? 20090410 17:57:37< Dragonking> Currently it does not check if unit is in village or not, and it assigns equal eval against every 'valid' targer 20090410 17:57:47< Dragonking> I'd like add some pririties, for example against enemy leader 20090410 17:57:55< Dragonking> priorities' 20090410 17:58:12< boucman> Dragonking: yes, I wanted it to be a proof of concept for other people wanting to do candidate moves, but it was a bit slow to tweak and didn't fit that purpose 20090410 17:58:53< boucman> Dragonking: I think that "oportunities to kill enemy leader" should be a separete candidate move that returns higher priorities, not a special casing of every rules 20090410 17:59:21< boucman> (which means that we need a "scale" for priorities, something we currently miss 20090410 17:59:31< Dragonking> Well, that's not really 'ooprtunity' to kill, not in most situations. :) 20090410 18:00:12< boucman> i'm not sure what your special case is supposed to cover, then... 20090410 18:00:28< Dragonking> It is only to poison leader 20090410 18:00:54< Dragonking> Add priority for it - do not posion other units, if leader in range - just poison leader. 20090410 18:01:26< boucman> oh, ok 20090410 18:01:37< boucman> sounds good 20090410 18:01:45< Dragonking> That's what I meant by "and it assigns equal eval against every 'valid' targer" 20090410 18:02:05< boucman> well, i'm find with that sort of tweaks, just go on 20090410 18:02:11< Dragonking> ok 20090410 18:02:22< boucman> (i'm adapting healers to the new syntax right now, so don't touch that one though) 20090410 18:02:27< Dragonking> okok :) 20090410 18:02:44< Dragonking> And really, with new syntax it looks *much* better. :) 20090410 18:02:44< boucman> hmm 20090410 18:02:54< boucman> healer is currently uncommited, so no need to adjust :) 20090410 18:03:02< boucman> indeed it does :) 20090410 18:03:53< Dragonking> Hm.. but first I'll hunt for one bug... 20090410 18:08:15< Crab_> boucman: yes, "scale" for priorities is a "must have" thing... and, imo, it should have some concrete meaning, not just "pure number".. 20090410 18:08:51< boucman> Crab_: we still have to decide on a scale, but yes, it was planned to have that from the start 20090410 18:09:12-!- wesbot changed the topic of #wesnoth-dev to: 1.6.1 planned for Sunday, April 12th, stringfreeze for branches/1.6 ! | Summer of Code info: http://www.wesnoth.org/wiki/SummerOfCodeIdeas | 53 bugs, 232 feature requests, 11 patches | logs: http://irclogs.wesnoth.org/ | Don't paste on IRC! Use a pastebin: http://wesnoth.pastebin.com | http://imagebin.org 20090410 18:09:19< boucman> we didn't do it because we had no idea what sort of scale we would need, and it seems a bit hard to guesstimate until we replace most of the C++ AI 20090410 18:10:09-!- Patterner [n=Psyche@g224106101.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 20090410 18:10:10-!- Psyche^ is now known as Patterner 20090410 18:11:42< Crab_> boucman: IMO, some 'rough' guidelines are needed even now - as soon as we have 2+ different candidate formulas for single unit. 20090410 18:12:18< Crab_> boucman: even something as simple as: "100 is very good, 50 is good, 1, barely good" 20090410 18:13:37< boucman> Crab_, Dragonking: the three of us are here, let's get started :) 20090410 18:14:12< Dragonking> heh 20090410 18:14:13< Dragonking> ok 20090410 18:14:42< boucman> i'd take a 1..1000 scale, so we have some space to grow 20090410 18:15:00< Dragonking> Makes sense 20090410 18:15:15< boucman> and maybe add an (empty) wrapper so that we can change our scale if needed 20090410 18:15:45< Dragonking> How do you imagine it working? 20090410 18:15:49< Crab_> boucman: lets keep it simple ) 20090410 18:16:12< Crab_> boucman: we just need to make our different formulas "be comparable" 20090410 18:16:43< Dragonking> Crab_: Not only that... some of formulas should be 'different level' than other ones. 20090410 18:16:48< boucman> if we have a formula like 20090410 18:16:56< boucman> score(x) that returns x 20090410 18:17:21< boucman> and we always call that function before returning, (and assuming all external formula writers do the same) 20090410 18:17:33< Crab_> maybe score(x,y) then ? 20090410 18:17:44< boucman> then by changing score(x) to return 10*x we can change the scale to give us some space 20090410 18:17:46< Crab_> where x is the "level" Dragonking is talking about, and y is the score.. 20090410 18:17:59< boucman> but that's not fundamental, it's just an idea I'm throwing around 20090410 18:18:24< Dragonking> Crab_: Nah, I didn't meant that. 20090410 18:18:31< Crab_> Dragonking: then explain :) 20090410 18:18:37< boucman> if we just don't care about external formula writers (which could be a valid policy too) no need to do that 20090410 18:18:39< Dragonking> I meant that we should clasify candidate moves 20090410 18:18:45-!- res|laptop [n=res@pdpc/supporter/student/res2k] has quit [Read error: 110 (Connection timed out)] 20090410 18:18:55< boucman> Dragonking: classify in what way ? 20090410 18:18:58< Dragonking> ANd for example such things like poisoning, is low priority, so it can get score from 0 to 100 20090410 18:19:13< Crab_> boucman: I thing "don't care about external formula writers" is a good policy for the moment 20090410 18:19:23< Crab_> s/thing/think 20090410 18:19:25< boucman> i'd tend to agree 20090410 18:19:29< Dragonking> I agree 20090410 18:19:39< boucman> ok, it's settled then 20090410 18:19:41< Crab_> boucman: since if they want to develop an AI in fai now, then need to be here on IRC 20090410 18:19:49< boucman> :P 20090410 18:19:57< Crab_> boucman: to be able to nag us about bugs :) 20090410 18:20:03< Dragonking> yes;) 20090410 18:20:29-!- zookeeper [n=l@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20090410 18:21:03< Crab_> so, basically we need to make .fai *usable* first) 20090410 18:21:12-!- res|laptop [n=res@erft-4d07fdef.pool.mediaWays.net] has joined #wesnoth-dev 20090410 18:21:16< boucman> Dragonking: so you would divide the scale in large intersecting chunks, 20090410 18:21:23< boucman> what would these chunks be ? 20090410 18:21:28< Crab_> and we're free to do anything with it to do the, since almost noone uses it now anyway ) 20090410 18:21:36< Dragonking> boucman: I'm just throwing an idea :) 20090410 18:21:50< boucman> yes, and i'm making you throw more ;) 20090410 18:22:01< Dragonking> Well, my idea is now 20090410 18:22:03< Crab_> lets settle for "the simplest thing that will work now", and if we need it, change it later... 20090410 18:22:09< boucman> there are no good choice at this point, we need a scale but we don't have enough knowlege to do a wise decision 20090410 18:22:31< Crab_> now we need, if we have two formulas, to know what to return from it ... 20090410 18:22:32< boucman> so we need to come up with something and be aware that it will most likely change 20090410 18:22:51< Dragonking> Well.. think about situation 20090410 18:23:11< Dragonking> We have 2 candidate moves: 'poison enemy' and 'cover leader' 20090410 18:23:39< Crab_> one useful indicator of the move utility is the indicator tied to 'rough approximation value of the move in gold' 20090410 18:23:41< Dragonking> Cover leader should have bigger impact on a unit, than poison enemy 20090410 18:24:25< Crab_> Dragonking: yes, if the leader is in danger 20090410 18:24:40< Dragonking> Exactly 20090410 18:24:56< Crab_> so, we need to attach a number to this danger. 20090410 18:24:59< Dragonking> So I'd say that poison is low priority - it should eval from 0 to 100 20090410 18:25:16< Dragonking> But other one, as higher priority, should eval from 0 to say.. 500 20090410 18:25:32< Dragonking> TO easly "win" with poisoning 20090410 18:25:34< Dragonking> If needed 20090410 18:25:37< Crab_> lets, for the moment, replace the leader with 'healer' 20090410 18:25:54< boucman> Dragonking: if I can go a bit deeper on your example 20090410 18:26:05< Crab_> and replace 'poisoning' with 'killing an enemy' 20090410 18:26:06< boucman> 0 is a special case, it means "discard 20090410 18:26:13< Dragonking> Yes 20090410 18:26:16< Crab_> boucman, <0 means discard 20090410 18:26:22< Dragonking> Crab_: <=0 20090410 18:26:23< boucman> Crab_: ok 20090410 18:26:28< Crab_> Dragonking: ok ) 20090410 18:26:33< boucman> well, that's not really important 20090410 18:26:38< Dragonking> True. :) 20090410 18:26:56< boucman> poison should use the scale 1..100 (assuming useless cases have been droped) 20090410 18:27:36< boucman> where saving leader should use the scale 901..1000, the actual number being dependant of the chances of the action succeeding 20090410 18:28:02< boucman> in other word, the 900..1000 area is reserved to actions that make us loose the game/win the game instantly 20090410 18:28:47< Crab_> so, if we have two choices: 1) 50% of losing the unit which costs 60gold 2) 50% of kil a unit which costs 20 gold and can do 10 gold of avg. damage next turn, we'll have: value of (1) is 30 gold (50%*60), value of (2) is 20 gold (50%*20+10), so (1) should return K*30, (2) should return K*20 20090410 18:28:58-!- wesbot [n=wesbot@wesnoth/bot/wesbot] has quit [Read error: 60 (Operation timed out)] 20090410 18:29:09< boucman> we would need a large area (for example 300..700) for normal action (fighting) and special actions could go around that case 20090410 18:29:36< Shadow_Master> wesbot! :( 20090410 18:30:09< Crab_> Shadow_Master: top secret ai discussions, so the wesbot is removed from the channel :) 20090410 18:30:32< Crab_> boucman, Dragonking: what do you think about my "tie-to-gold" proposal ? 20090410 18:31:18-!- wesbot [n=wesbot@wesnoth/bot/wesbot] has joined #wesnoth-dev 20090410 18:31:34< boucman> Crab_: change "gold" to unit_value where unit_value would be a separate formula that would return gold value as a first aproximation, but that we would tweak later to take our need into account, it's position etc... and the idea makes sense to me 20090410 18:31:58< boucman> Dragonking probably wrote a big part of that function for the recruitement part, so there is some reuse oportunity here 20090410 18:31:58< Dragonking> Yes, I was about to write the same :) 20090410 18:32:29< Dragonking> TO take into accout higher value of leader, and different attack 'gold' approximation depending on weapon specials etc 20090410 18:32:50< Crab_> for example, if leader is 1000 gold, K=10, and he'll be dead with 50% chance next turn, and we can cover him to make him die only with 20% chance, then the move is worth K*COST*(50%-20%) = 10000*30% = 3000 20090410 18:33:23< Dragonking> boucman: Before re-using anything I need to go through my formula code and categorize it. 20090410 18:33:50< Crab_> boucman: and, in general case, the value of a move is a differential of a position evaluation function over the candidate move 20090410 18:33:52< boucman> Dragonking: sure, it was more from a reflection point of view, 20090410 18:34:39< boucman> my guess is that we will need a generic unit_value function to simplify stuff everywhere... 20090410 18:35:01< Crab_> boucman: we need a generic "principles of position evaluation" wiki page 20090410 18:35:20< boucman> yup 20090410 18:35:21< Crab_> boucman: even if we have no position evaluation function, we can tell about the principles.. 20090410 18:35:46< Crab_> boucman: and each fai function should take those principles into consideration when returning value 20090410 18:36:20< boucman> hmm, if I could embed as much of the evaluation principle in helper functions, I would rather have that 20090410 18:36:34< boucman> see, if I take the poisoning formula 20090410 18:36:51< Dragonking> boucman: On a different note.. any reason why candidate moves are added as functions, and what is purpose of "inputs" ? It looks for me like just ripped and copied code of registering new formula function via WML 20090410 18:36:52< boucman> i'm ok for the formula checking if a unit regenerates or is in a village 20090410 18:37:08< boucman> Dragonking: it probably is 20090410 18:37:40< Dragonking> I don't see much reason of keeping candidate move as available function. 20090410 18:37:55< Crab_> boucman: yes. so we'll basically need a 'position evaluation function which uses parameters set by the formula function' 20090410 18:38:02< boucman> but the poison eval should not contain code for generic comparison of units it should simply return unit_value(target)*multiplicative_factor 20090410 18:38:11< boucman> so we can tweak easily unit_value 20090410 18:38:17< Crab_> boucman: yes 20090410 18:38:39< Crab_> boucman: but there's a dependency loop hidden there :) 20090410 18:38:44< Crab_> boucman: let me explain 20090410 18:38:50< boucman> please do :) 20090410 18:39:45-!- euschn [n=chatzill@85-127-110-115.dynamic.xdsl-line.inode.at] has quit [Remote closed the connection] 20090410 18:41:30< Crab_> if we have a 'candidate move' type of function, then its mission is to suggest 'interesting moves' to formula_ai::make_candidate_moves(). and, formula_ai::make_candidate_moves() picks "most interesting move" and executes it. and the 'most interesting' move will lead to the 'most interesting' results. 20090410 18:42:05< Crab_> and, we're trying to get each move to tell 'its value' 20090410 18:42:33< Crab_> and, we're coming to the conclusions that the value of the move is tied to its results (eg unit_value(target)*multiplicative_factor ) 20090410 18:42:41< boucman> ok, i follow you so far 20090410 18:44:07< boucman> it's not tied to its result, unit_value is a generic function telling us if the unit is a good target, not something that is estimating the resulting situation... 20090410 18:45:17< CIA-30> dragonking * r34681 /trunk/src/formula_ai.cpp: Code cleanup, removed obsolete team_formula and rulebase 20090410 18:45:49< Crab_> so, basically, we are going from the move to its results (in .fai), then from its results to number (in .fai), then, from that number, back to the move's results (by executing it, in C++) 20090410 18:47:05< boucman> Crab_: well, I don't really see the loop here 20090410 18:47:09< Dragonking> In fai, we sort-of "estimate" result, to pick up best one, and then execute it. 20090410 18:47:28< Dragonking> "estimate" is not equal to "execute" 20090410 18:48:24< Crab_> ah yes, DK is right. 20090410 18:48:35< Crab_> so, we just would need some generic "estimator" functions 20090410 18:48:48< boucman> Crab_: AI is too complicated for us to have any chance to find the best move 20090410 18:49:08< Crab_> boucman: no, I was thinking about other thing) 20090410 18:49:11< boucman> the idea of candidate_moves is to have heuristics that would provide good enough moves and be easily plugable 20090410 18:49:18< boucman> ok 20090410 18:49:29-!- thaer89 [n=thaer89@80.90.168.4] has joined #wesnoth-dev 20090410 18:49:29< Crab_> a procedure such as: "fai suggest we poison that unit" - > "estimate effect of that poisong attack" -> return this value 20090410 18:49:51< boucman> yes we will need some generic estimators, that won't be perfect nor complete, but should be good enough for us to move on 20090410 18:49:58< Crab_> basically, make .fai candidate moves return not value directly, but the result of some 'estimator' 20090410 18:50:52< thaer89> anyone know where or how to be familar game code and style of coding 20090410 18:50:52< boucman> yes, what we return is an estimate of how good we think our move is, it's not an absolute value, which would be impossible to estimate 20090410 18:51:07< boucman> thaer89: the recomented way is to read the code :) 20090410 18:51:53< Crab_> boucman: so, I am thinking about something like this: .fai will, basically tell "by doing this, we : 1) pin down that unit A, 2) attack this unit B 3) be in position to heal this unit C, ...., threaten enemy leader in D", and estimate this using some 'generic estimators' or ad-hoc modifiers. 20090410 18:52:11< Crab_> boucman: to make different .fai functions return comparable estimates 20090410 18:52:12< thaer89> i know 20090410 18:52:21< boucman> hmm 20090410 18:52:24< thaer89> but i dont to read all the code files 20090410 18:52:41< boucman> I think that would be too complicated to do right 20090410 18:52:41< thaer89> i need only the base code 20090410 18:52:52< Crab_> boucman: it would, at least, work ) 20090410 18:52:56< boucman> thaer89: concentrate on an area that interests you, I guess 20090410 18:53:15< boucman> Crab_: only if we implement that, but my guess is that it's already too complicated to do 20090410 18:53:44< boucman> a simple "I attack that unit, it has this value, and my chance to kill is that much" is probably the best we can realistically do 20090410 18:53:53< boucman> anything else would be toocomplicated to master 20090410 18:53:57< thaer89> okay i will try 20090410 18:54:06< Dragonking> I get the feeling that Crab_ is currently talking about "Attack" candidate move, that would be general attack formula, am I right? 20090410 18:54:19< thaer89> another question 20090410 18:54:31< thaer89> what its wml tags 20090410 18:54:48< boucman> thaer89: I don't understand your question 20090410 18:54:49< Crab_> boucman: it is not too complicated. In fact, this is just a small abstraction layer. So the formula AI candidate move will not just return "100", but return ESTIMATION_OF_ATTACK(a,b,c) 20090410 18:55:04< Crab_> or ESTIMATION_OF_ATTACK(a,b,c) + AD_HOC_MODIFIER(10) 20090410 18:55:12-!- mordante [n=mordante@wesnoth/developer/mordante] has joined #wesnoth-dev 20090410 18:55:17< thaer89> what mean of wml config tag 20090410 18:55:25< mordante> hi 20090410 18:55:26< Crab_> this will make all .fai functions which do simular things, return simular results. 20090410 18:55:50< Crab_> Dragonking: no, I'm trying to propose a way to make the return values of different formulas comparable 20090410 18:56:04< boucman> Crab_: this is totally different from the current RCM philosophy (and explains why you felt there was a loop earlier) 20090410 18:56:10< Dragonking> Crab_: Then elaborate please, what this a, b ,c is? 20090410 18:56:25< Crab_> boucman: no, it doesn't inferfere with RCM 20090410 18:56:38< Crab_> Dragonking (attacker, attacker_location, defender) 20090410 18:56:51< boucman> it doesn't interfere, but it's not the way we envisionned things (we could change our vision, but we have to be sure it's worth it) 20090410 18:57:25< Crab_> boucman: I simply propose an extension of your idea 'score(x) that returns x' 20090410 18:57:52< Crab_> score_attack_unit(a,b,c)+score2(...)+score3(...) , etc. 20090410 18:58:31< boucman> no, you are proposing a philosophical shift from "it's the formula's responsability to estimate the move" to "the formula should describe the (gameplay) consequences of it's move, and the engine will evaluate" 20090410 18:59:00< thaer89> where i can read about wml mapping 20090410 18:59:20< boucman> this is a very important change, especially since a formula needs to focus on all consequences of its move in a way which is totally independent of its move, so it might as well return the move and the separate evaluator evaluate the move 20090410 18:59:24< Crab_> boucman: yes, you are right. but I propose only a partial shift, a small shift in this direction to make different formulas evaluate comparably. 20090410 18:59:35< boucman> and in that case, I don't really understand the point of RCM, let's just evaluate all moves 20090410 18:59:55< Ivanovic> ah, and now to have a look at getting the po files for DM info mainline, wish me luck... 20090410 19:00:08< boucman> good luck Ivanovic 20090410 19:00:09< Crab_> boucman: RCM will allow to search only the 'interesting' subset of candidate moves, so RCM is very useful still 20090410 19:00:26< Crab_> boucman: for example, if you have two formulas, A and B.. 20090410 19:00:26< Dragonking> Crab_: How would you evaluate healer move with this score_attack_unit ? 20090410 19:00:35 * Dragonking feels he is missing the point 20090410 19:00:39< Crab_> and A kills a unit, and B kills a unit, how can we compare ? 20090410 19:00:41< mordante> good luck Ivanovic 20090410 19:00:53< Crab_> Dragonking: healer move will not use score_attack_unit, if this is not an attack ) 20090410 19:00:54< boucman> Crab_: the only hard part of the AI is the evaluator, by pushing it into C++, you miss the whole point of FAI, and RCM becomes just an optimization 20090410 19:01:27< Crab_> Dragonking: healing moves can use score_heal() ) 20090410 19:01:52< boucman> where score_heal is a c++ function ? 20090410 19:01:54< Dragonking> Crab_: Ok.. so you are proposing combining RCM with some pre-defined eval system? 20090410 19:02:03< Dragonking> boucman: I don't think so 20090410 19:02:36< Crab_> "where score_heal is a c++ function ?" - it can be, or it can be a fai function 20090410 19:02:49< boucman> if it's not c++, then it's simply the content of the eval part of the RCM and I miss the point 20090410 19:03:02< Crab_> boucman: yes, it is 'the content of the eval part of the RCM' 20090410 19:03:18< boucman> for me, it has to be a FAI function, since that's precisely what needs to be studied/adjusted/tweaked 20090410 19:03:36< Crab_> boucman: yes, it has to be a fai function, but with c++ default also available 20090410 19:04:03< Crab_> boucman: to make the AI 'overload' only those evaluators it wishes to.. 20090410 19:04:10< thaer89> what mean fai faunction 20090410 19:04:15< boucman> Crab_: not sure a c++ default is a good idea since it currently doesn't exist, so we might as well do fai only, but ok, I kind of understand 20090410 19:04:36< Dragonking> Crab_: How would RCM eval interact with score_attack? 20090410 19:04:36< boucman> so what you are proposing is to have a library of "evaluator helpers" 20090410 19:04:38< Crab_> boucman: C++ default can be really simple 1-liner 20090410 19:04:40< boucman> ok, that makes sense to me 20090410 19:04:44< Crab_> boucman: yes, a library of "evaluator helpers" 20090410 19:05:01< Dragonking> thaer89: formula ai 20090410 19:05:14< boucman> Crab_: ok, in that case, I agree 20090410 19:05:15< Crab_> Dragonking: RCM will work as it is now, no changes there 20090410 19:05:19< CIA-30> esr * r34682 /trunk/data/campaigns/Delfadors_Memoirs/ (TODO maps/swamp.map): More DM map polishing. 20090410 19:05:28< Dragonking> Crab_: I know 20090410 19:05:41< Dragonking> Crab_: I would like to see how you want to use it inside eval 20090410 19:05:44< thaer89> so its for AI thing 20090410 19:06:20< boucman> thaer89: you just felt into a very technical discussion between three experts :P 20090410 19:06:29< Crab_> Dragonking, basically, instead of returning "100' or "10", return the result of some pre-defined formula, possibly multiplied by some koefficient, if the formula desires so. 20090410 19:06:36< boucman> not the best moment to hang around and meet people unfortunately 20090410 19:06:54< boucman> Crab_: ok, in that case I agree with you, it makes sense 20090410 19:07:00 * Dragonking too 20090410 19:07:08< boucman> I thought you wanted to have that on the c++ side which didn't make sense to me 20090410 19:07:31< Crab_> Dragonking: so, if we have three .fai candadate moves A,B,C, and A kills a unit and B kills a unit and C kills a unit, we want them to evaluate the value of that kill in a simular way... 20090410 19:08:05< Crab_> not, perhaps, "equal", but at least "simular enough" to be able to compare them 20090410 19:08:17< Dragonking> Crab_: Yes, I understood that :) 20090410 19:08:44< Dragonking> So we can have formula that "forsees" outcome and chooses best one (or any other one) specifed by us. 20090410 19:08:47< Crab_> and one of the ways to achieve this is to have a "helper library". it doesn't matter in what language it is written. 20090410 19:09:06< boucman> so your idea is basically an evaluate_value_of_kill(target,source,source_position) something like that ? 20090410 19:09:07< Crab_> Dragonking: "formula that "forsees" outcome and chooses best one (or any other one) specifed by us." - its another matter ) 20090410 19:09:22< Crab_> boucman: evaluate_value_of_kill, evaluate_value_of_healer_position, ... 20090410 19:09:42< Crab_> boucman: different helpers for different tasks.. 20090410 19:09:46< boucman> healer position might be a bit to specific to do a generic formula, but I agree with the principle 20090410 19:10:16< boucman> Crab_: however I disagree it can be any language, it has to be FAI, since that's the sort of functions people will want to test and tweak 20090410 19:10:40< Crab_> boucman: if we have got three healer formulas A,B,C, we need them we want them to evaluate the value of that healer movement in a simular way... not, perhaps, "equal", but at least "simular enough" to be able to compare them. 20090410 19:11:28< Crab_> " it has to be FAI" but it doesn't have to be *only* fai :) 20090410 19:12:10< Crab_> we just need the ability to write it in .fai 20090410 19:12:12< boucman> Crab_: ok, I consider that an implementation detail 20090410 19:13:17< Crab_> boucman: yes. basically, I want "plug-in" points such as this where the AI writers can write something simple but something which will affect ai considerably. 20090410 19:13:40< boucman> so, we still need a common scale for the result of these functions :) 20090410 19:14:03< Crab_> boucman: we need a common scale, yes, but only for those categories 20090410 19:14:06< CIA-30> dragonking * r34683 /trunk/src/ (formula_ai.cpp formula_ai.hpp): Cleanup of the RCM code 20090410 19:14:22< Dragonking> boucman: I removed most of "crap" from RCM creation code. 20090410 19:14:34< boucman> ok, good 20090410 19:15:42< Crab_> boucman: and this is harder. but, defaut_ai already has that 'scaling', sort of 20090410 19:16:18< Crab_> boucman: so we can take the 'order' from ai::do_move() 20090410 19:16:22< boucman> and how does it scale ? did you intend to export that default scale to FAI ? 20090410 19:16:23-!- |Andylee| [n=kvirc@188-23-9-196.adsl.highway.telekom.at] has joined #wesnoth-dev 20090410 19:16:30< boucman> you should have told us so from the start :P 20090410 19:17:18< Crab_> boucman: no, there it is simple. ai::do_move() is a tail-recursive function, and the order of different phases determines their importance to the ai 20090410 19:17:19< boucman> Crab_: if you managed to transform the whole c++ AI into a RCM using a subscale, that would be wonderfull :) 20090410 19:17:58-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 60 (Operation timed out)] 20090410 19:18:20< Dragonking> boucman: I'm going to add this proposed by me "precondition" and 'support' candidate move, and make existing candidate moves use that precondition if possible. 20090410 19:18:57< boucman> Dragonking: let me reread it in your proposal, but afair it was ok 20090410 19:19:11< Crab_> boucman: one thing that can be done, is to expose "default AI" moves as candidate moves for the CRM engine 20090410 19:19:37< Dragonking> boucman: There is still that one mistake in my wiki, I havn't corrected it yet (about when precondition will be used) 20090410 19:20:08< CIA-30> ivanovic * r34684 /trunk/ (57 files in 3 dirs): 20090410 19:20:08< CIA-30> import po files for Delfadors Memoirs from (ancient) wescamp translations 20090410 19:20:08< CIA-30> created po files for those not in that ancient wescamp version 20090410 19:20:08< CIA-30> pot-update for this campaign to have it match latest string status 20090410 19:20:08< CIA-30> steps to follow: switch textdomain to wesnoth-dm, add wesnoth-dm to g.w.o, ... 20090410 19:20:28< Crab_> s/CRM/RCM 20090410 19:20:36< boucman> Dragonking: i'm not very happy with your precondition syntax 20090410 19:20:54< Dragonking> boucman: What about it? 20090410 19:21:18< boucman> it should return a list of hash, that would be simpler thatn the way you do it in your porposal (if I understand your proposal correctly) 20090410 19:21:44< boucman> in my mind, the current attack type would return the following if implemented as a three_part formula 20090410 19:22:33< boucman> [ {me=>my_unit[0], target=>ennemy_unit[0]},{me=>my_unit[0],target=>ennemy_unit[1]}... ]* 20090410 19:22:58< boucman> this does not seem to be the syntax you propose, but I'm not sure what your syntax precisely is in your proposal 20090410 19:23:10< boucman> (i'm ok wit the support type, btw) 20090410 19:23:23< Dragonking> boucman: No, that's not it. 20090410 19:23:28< boucman> Crab_: yes, that would be great 20090410 19:23:31< Dragonking> boucman: Let me make example 20090410 19:23:35< boucman> Dragonking: ok, then please explain 20090410 19:23:38-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 19:23:41< Dragonking> boucman: For poison candidate move, it would be like that: 20090410 19:24:17< Dragonking> precondition="if(not filter(me.attacks,'att',filter(att.special,'spe',contains_string(spe,'poison'))),-1, 1) " 20090410 19:24:33< Dragonking> eval=" here code that looks for non undead, etc units" 20090410 19:24:53< Crab_> boucman: I've already started to refactor code towards the state where such changes will be possible to do" 20090410 19:25:14< Dragonking> boucman: SO precondition is just condition, if valid -> then check eval agaisnt all enemies 20090410 19:25:32< Dragonking> It is to optimize such CM like poisoner's one. 20090410 19:25:35< boucman> my idea is more generic :P 20090410 19:25:39< mordante> Reisiger, any news on the tests with cmake? 20090410 19:25:54< Dragonking> boucman: But in case of poisoner, builing a hash map will be more expensive 20090410 19:25:59< boucman> yours allows to filter on "me" more easily but only for the attack type of formulas IIUC 20090410 19:26:14< Dragonking> boucman: Attack and support 20090410 19:26:31< Reisiger> mordante: No. I tried some more variations of declaring where the pkg-config executable is. But nothing worked. 20090410 19:26:43< Dragonking> boucman: I want to provide a way to write formulas that are efficent 20090410 19:26:54< mordante> :-( really wonder why it worked yesterday 20090410 19:26:57< boucman> Dragonking: in your SoC example you don't specify if it's an attack or a support, how do you specify that ? 20090410 19:27:03< Reisiger> So do I. 20090410 19:27:13< boucman> Dragonking: ok, my idea had a different purpose, them 20090410 19:27:14< boucman> then 20090410 19:27:41< boucman> my idea was to allow to specify using FAI new FAI type= 20090410 19:27:49< Crab_> boucman: you are thinking about a two-phase candidate moves ? 20090410 19:28:05< Crab_> boucman: first phase - get interesting (me,target) pairs... 20090410 19:28:08< Dragonking> boucman: Ahhhhh you're right 20090410 19:28:15-!- Blueblaze [n=nick@c-98-199-143-139.hsd1.tx.comcast.net] has joined #wesnoth-dev 20090410 19:28:20< Dragonking> boucman: I did not specify it was for attack/support CM 20090410 19:28:23< CIA-30> ivanovic * r34685 /trunk/ (48 files in 8 dirs): 20090410 19:28:23< CIA-30> change textdomain from wesnoth-Delfadors_Memoirs to wesnoth-dm 20090410 19:28:23< CIA-30> add wesnoth-dm to CMake build system 20090410 19:28:24< boucman> Crab_: nope, let's take an example where my idea is really usefull 20090410 19:28:27< Crab_> ok 20090410 19:28:46< boucman> imagine I want to do a (simplified) leadership handling 20090410 19:28:57< Crab_> imagined :) 20090410 19:29:05< boucman> the usuall types (attack, move, and soon support) wouldn't really make it for me 20090410 19:29:11< Crab_> yes 20090410 19:29:30< Dragonking> boucman: Is my understanding of your idea correct according to what i wrote in my application? 20090410 19:29:43< CIA-30> ivanovic * r34686 /branches/resources/gettext.wesnoth.org/public_html/wesnoth-gettext/westats/config.php: 20090410 19:29:43< CIA-30> add wesnoth-dm to g.w.o 20090410 19:29:43< CIA-30> NOTE: import of Delfadors Memoirs to trunk should not be completed, everyone please check! 20090410 19:29:54< boucman> I need something very specific, I would like to be called for every (me,support,target) where support is next to target (here, I assume that we wont move support, this is the simplification) 20090410 19:30:33< boucman> so the idea is that I have a first formula that would build the parameters, and then the engine would call me with these parameters 20090410 19:31:00< Crab_> boucman: but how can the leader know if the 'support' is going to attack from its current location ? 20090410 19:31:24< boucman> so a first part parameter= formula would return something like [{me=>unit with leaderhip, support=>my unit,target=> target unit}...] 20090410 19:31:54< mordante> esr, Shadow_Master regarding DM why aren't the maps numbered? 20090410 19:32:00< boucman> Crab_: that's not the point, I'm trying to explain what I want, not to do a real leadership formula 20090410 19:32:06< Crab_> boucman: and if the second part will return "good result", how many moves will be executed ? 20090410 19:32:18< Crab_> one ? (for me) or two (support and me) ? 20090410 19:32:33< Dragonking> Me and support apparently 20090410 19:32:42< Dragonking> In such order. 20090410 19:33:01< boucman> Crab_: only one that would take the same parameters, but would return multiple moves in an array 20090410 19:33:09< Crab_> boucman: interesting 20090410 19:33:19< esr> mordante: Mainly because I fiund themnm thaty way. But I don't think numbering maps is good practice, because it's hard to number a map that's used twice - and that happens in some places. 20090410 19:33:28< Crab_> boucman: the problem is to have a good first part 20090410 19:33:43< esr> Son of the Black Eye is onne instance. 20090410 19:33:48< boucman> Crab_: you mean the param part or the eval part ? 20090410 19:33:58< Crab_> " so a first part parameter= formula would return something like [{me=>unit with leaderhip, support=>my unit,target=> target unit}...]" 20090410 19:34:10< boucman> ok, 20090410 19:34:13 * zookeeper thinks its a whole lot easier to find maps when they're numbered even if some is used multiple times 20090410 19:34:28< boucman> yes, but as I said my idea has apparently a different purpose than Dragonking's 20090410 19:34:44< Reisiger> mordante: No clue why... but after copying pkg-config into the general lib folder (is in PATH), running CMake config, and deleting it, it now actually tries to compare verisons 20090410 19:34:46< zookeeper> since you can always name them using both numbers.. 20090410 19:34:46-!- Andylee [n=kvirc@188-23-3-44.adsl.highway.telekom.at] has quit [Read error: 110 (Connection timed out)] 20090410 19:34:51< boucman> i'm trying to add a way for formulas to build "type" that they don't have if the need arise 20090410 19:35:02< Reisiger> *versions 20090410 19:35:11< mordante> esr, ok, I just recall most campaigns used the numbered version 20090410 19:35:12< boucman> whereas Dragonking wants to add early filters on existing types to optimize FAI 20090410 19:35:22< boucman> (both are valid goals, btw) 20090410 19:35:25< mordante> Reisiger, :-) 20090410 19:35:38< Dragonking> boucman: Ok, so in your idea, we buld a lost of maps 20090410 19:35:47< Reisiger> Lovely how some things make no sense whatsoever o_O 20090410 19:35:51< zookeeper> when i'm opening a map in the editor, 90% of the time i try to find the map based on the scenario sequence, not the scenario's name 20090410 19:35:52< boucman> Dragonking: ??? 20090410 19:36:04< Dragonking> s/lost/list/ 20090410 19:36:10< boucman> Dragonking: yes 20090410 19:36:36< Dragonking> Like { 'me' -> .. , 'enemy1' -> .. , ..... } 20090410 19:36:50< boucman> yes exactly 20090410 19:36:53< Dragonking> ok 20090410 19:37:09< boucman> the key would be the names for the parameters that would be passed to eval/move 20090410 19:37:16 * Dragonking is going to take a look at it :) 20090410 19:37:18< esr> mordante: Yes, most campaigns do number. 20090410 19:37:23< Dragonking> Yes, I understood that. :) 20090410 19:37:36< boucman> (btw I have a syntactic suggestion for your idea, but again, it's totally different from mine) 20090410 19:37:46< Dragonking> Yes? 20090410 19:37:50< boucman> just a sec 20090410 19:37:54< mordante> Dragonking, can you set your editor to use tabs for indention? 20090410 19:38:11< Dragonking> mordante: Code? 20090410 19:38:24< Crab_> boucman: so, basically you want to 'get groups of units' first, then run formulas on each of those groups ? 20090410 19:38:24< mordante> formula_ai.cpp 20090410 19:38:44< Dragonking> mordante: hmr... I thought it uses tabs :S 20090410 19:38:45< mordante> r34674 20090410 19:39:01< CIA-30> esr * r34687 /trunk/data/campaigns/Legend_of_Wesmere/scenarios/19_Costly_Revenge.cfg: Add some dialog requested by fendrin. 20090410 19:39:27< boucman> Dragonking: http://wesnoth.pastebin.com/m6d440ae2 <=syntax works with any ast/present/future types 20090410 19:39:36< boucman> much easier to expand later 20090410 19:40:13< boucman> Crab_: that would be more "get groups of parameters" some parameters could be location too for example, but yes, that's the idea 20090410 19:40:25< Crab_> boucman: ok, got it 20090410 19:40:37< esr> Dragonking: Are you responsible for the exportation of formula $() syntax into general attributes? If not, who is? 20090410 19:40:48< zookeeper> esr, i think sapient 20090410 19:40:56< Crab_> boucman: IMO, interesting and efficient, if you manage to get interesting groups 20090410 19:40:58< boucman> sapient iirc 20090410 19:41:00< Reisiger> mordante: Can't get past the version checking... http://wesnoth.pastebin.com/m2739c51a 20090410 19:41:03< Dragonking> esr: No, not me. 20090410 19:41:05< mordante> I also think it's Sapient 20090410 19:41:22< boucman> Crab_: efficiency would be good, but my point is to allow expansion 20090410 19:41:25< Dragonking> boucman: filter_target... I don' think it is really needed. 20090410 19:41:35< esr> I need to corner Sapient, then, because I found a context where it doesn't seem to work reliably. 20090410 19:41:42< boucman> if we discover a particular threesome formula is very common we rewrite it in c++ :) 20090410 19:42:09< boucman> Dragonking: the point is to allow an optional filter_ for any target 20090410 19:42:33< boucman> it should be easy to do in a generic way and would avoid future recoding if we find out we need it for other types we never have thought of yet 20090410 19:43:03< Dragonking> boucman: You cna do it in precondition -> if( me. loc = ..., something, targer.loc, something, ..) 20090410 19:43:40< boucman> yes, but that's not any gain compared to doing it in eval= 20090410 19:43:42< Crab_> boucman: efficiency is key. since to make a group of size K from M units, we have C(M,K) variants, which scales as O(M^K) 20090410 19:43:53< Dragonking> boucman: Um wait 20090410 19:43:59< CIA-30> ivanovic * r34688 /trunk/po/Makefile.am: sort alphabetically when compiling the po files via autotools (no change in functionality, just easier to find the part where the textdomain that I want to "visually check" is...) 20090410 19:44:22< boucman> by filtering separately the variables we make something both easier to use and we allow easy optimization of the most common cases. 20090410 19:44:42< Crab_> boucman: yes. and, of course, even K=2 will allow more interesting behavior 20090410 19:44:42< boucman> specific cases needing both variables at the same time should be filtered by returning 0 in the eval= part 20090410 19:44:49< mordante> Reisiger, is the pango path in the PKG_CONFIG_PATH environment variable 20090410 19:45:01< Dragonking> Then we need to scan whole cfg part, and read formulas form it 20090410 19:45:28< boucman> Crab_: agreed, building will be long, thats why I still want the most common cases in C++ 20090410 19:45:44< Ivanovic> and now, so that everyone of you has some fun: a pot-update on trunk! 20090410 19:46:04< Dragonking> boucman: But that would not really work with your type. 20090410 19:46:15< boucman> Dragonking: not sure what you mean, we already do that to load the other formulas... 20090410 19:46:21< Reisiger> mordante: Still getting the error. I tried the pangocairo and pangocairo/bin folders. 20090410 19:46:27< boucman> it would 20090410 19:46:28< Dragonking> boucman: But with your idea we can have like: 20090410 19:46:35< Crab_> boucman:there's different ways to make it faster.. 20090410 19:47:00< Dragonking> [ {me -> my_leader, targer -> enemy1}, {me -> my_healer, target -> enemy2 } ] 20090410 19:47:02< Crab_> boucman: 1st is indexes. 'get all my leadership units' or 'get all my healers' should return from cache. 20090410 19:47:25< Dragonking> So we can't optimize, we need to evaluate all maps 20090410 19:47:41< mordante> Reisiger, I think you need the pangocairo/lib directory 20090410 19:47:59< Dragonking> boucman: Since 'me' is different in diffetent maps. 20090410 19:48:24-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 19:48:43< Reisiger> mordante: No joy. :( 20090410 19:48:47< Dragonking> boucman: In your case such 'optimizing' is a formula that builds this hash-map 20090410 19:48:50< mordante> :-( 20090410 19:48:59 * boucman is starting to get confused 20090410 19:49:00< Crab_> Also, we can "build" those groups incrementally. build some groups of size 2, then search for interesting groups, and expand them to size 3, search for interesting groups, expand them to size 4, etc... 20090410 19:49:03< mordante> I really wonder what changed since yesterday 20090410 19:49:32< Reisiger> So do I... this is just weird... 20090410 19:49:49< boucman> Dragonking: let's keep with your idea, don't you think that the filter_me name is better ? it allows easier filtering 20090410 19:50:08< boucman> /filtering/expansion 20090410 19:50:36< Dragonking> boucman: Actually I tihnk ti is better name, but I don't get this expansion part 20090410 19:51:13< CIA-30> ivanovic * r34689 /trunk/src/ (scripting/ storyscreen/): add some svn ignore on files that are created by autotools 20090410 19:51:31< boucman> well, my syntax allows to just declare "any RCM parameter can be filtered separately via filter_ formula" 20090410 19:51:41< boucman> even if we don't do it right away 20090410 19:51:55< boucman> for instance, let's take the case of poison 20090410 19:51:55< Dragonking> boucman: Let me ask you something 20090410 19:52:03< boucman> ok, go on 20090410 19:53:27< Dragonking> boucman: Do you mean: use "filter_me" to simply make things organized and make it intuitive - so it really only filters "me" or: use filter_ so code loads WML config and registers filter for each specified ? 20090410 19:54:00-!- Tesafilmchen [n=tesa__@p5B27796C.dip.t-dialin.net] has joined #wesnoth-dev 20090410 19:54:17< Ivanovic> rejoice! 20090410 19:54:24< boucman> I want to do the first, but I want to keep my options open if I ever need/want the second 20090410 19:54:28< Ivanovic> you will soon have to download 10MB to get po/ updated 20090410 19:54:30< Ivanovic> :) 20090410 19:54:54< Dragonking> boucman: So basically you propose changing name from precondition to filter_me 20090410 19:55:00< boucman> moreover I already can see a case where we do need filter_target (not poisoning regenerating units) 20090410 19:55:05< boucman> not only, 20090410 19:55:07< loonycyborg> Ivanovic: Thankfully I'm not on dial-up anymore :P 20090410 19:55:22< boucman> the other difference in my code is that the type is attack, it's not a new type 20090410 19:55:35-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Connection timed out] 20090410 19:55:37< Ivanovic> loonycyborg: for scons nothing has to be done to have the new textdomain in, right? 20090410 19:55:38< Dragonking> boucman: Um, that is taken care in eval 20090410 19:55:42< boucman> that's the big difference (i thought you had noticed, that's why my explanations might seem a bit onfusing) 20090410 19:55:59< Dragonking> boucman: I did not propose new type 20090410 19:56:01< Ivanovic> just want to be sure, since cmake and autotools definitely allow using the new textdomain 20090410 19:56:49< boucman> Dragonking: doing it in a filter is more efficiant, if m are my units, and n the ennemy units, eval is o(m*n) whereas using two filteres is o(m+n) 20090410 19:56:52< Dragonking> boucman: I just wanted to add precondition to attack and support CM. To allow some optimalization of these two. 20090410 19:57:05< boucman> (and it's also more instincitve and easier to read) 20090410 19:57:25< CIA-30> ivanovic * r34690 /trunk/ (1032 files in 23 dirs): 20090410 19:57:25< CIA-30> pot-update (first one for post 1.6.x trunk, things *really* differ now and translator should not touch it till strings have settled a little!) 20090410 19:57:25< CIA-30> regenerated doc files 20090410 19:57:25< CIA-30> Note: HUGE download! ;) 20090410 19:57:37< boucman> Dragonking: and I offer to do it using a syntax that allows to expand on that idea later 20090410 19:58:11< loonycyborg> Ivanovic: msgfmt part definitely works. Testing pot-update now.. 20090410 19:59:05< Dragonking> boucman: if we use: filter_my and get m units, then filter_target, get m unit, then we still work on combinations of units, and get o(m*n) 20090410 20:00:07< boucman> ok, my efficiency explanation might be a bit confusing 20090410 20:00:34< boucman> let me reexplain 20090410 20:01:06< boucman> currently eval is called m*n times with m and n the number of units on the map 20090410 20:01:11< Dragonking> Yes 20090410 20:01:41< boucman> if we do filtering, we get m' and n' being the number of units after filtering, which is <= 20090410 20:02:34< boucman> and the number of calls to eval is now m'*n' if you add in the filtering you get a complexity of o(m+n+m'*n') which will be much smaller in the general case 20090410 20:02:52< Dragonking> OK, now I understand. 20090410 20:03:12< boucman> cool, I have to leave now...* 20090410 20:03:49< boucman> if you're convinced with my idea, go with it, if you're not, let's discuss it some more later, because I really think it's a good idea worth discussing in length 20090410 20:03:51-!- Gauteamus [n=chatzill@c43C4BF51.dhcp.bluecom.no] has joined #wesnoth-dev 20090410 20:04:03< boucman> see you all later 20090410 20:04:07 * boucman runs away 20090410 20:04:09< Dragonking> boucman: good idea, bye 20090410 20:04:14< Crab_> bye ) 20090410 20:06:07< loonycyborg> Ivanovic: scons pot-update works too and updates wesnoth-dm 20090410 20:06:22< Ivanovic> good 20090410 20:08:31-!- Blueblaze [n=nick@c-98-199-143-139.hsd1.tx.comcast.net] has quit [Remote closed the connection] 20090410 20:08:32< mordante> Ivanovic, did you try the pot-update2 in cmake? 20090410 20:08:43< Ivanovic> mordante: no 20090410 20:08:48-!- Gauteamus [n=chatzill@c43C4BF51.dhcp.bluecom.no] has quit ["ChatZilla 0.9.84 [Firefox 3.0.8/2009032609]"] 20090410 20:09:03< Ivanovic> i just did a plain and normal pot-update for the moment since things changed due to the addition of dm anyway 20090410 20:09:14< mordante> ok then I'll need to test it later 20090410 20:12:10< CIA-30> ivanovic * r34692 /branches/1.6/po/wesnoth-manpages/fi.po: updated Finnish translation 20090410 20:12:10< CIA-30> ivanovic * r34691 /trunk/po/wesnoth-manpages/fi.po: updated Finnish translation 20090410 20:15:26< stikonas> Ivanovic: is it better to send you just 1.6 translations or 1.6 + trunk (with translations automatically merged from 1.6 branch)? 20090410 20:15:38< Ivanovic> stikonas: only send 1.6 20090410 20:15:48< Ivanovic> those files i do always merge to trunk 20090410 20:16:11< Ivanovic> makes my life a whole lot easier since i don't have to seperate 20090410 20:19:31< Polarina> Wait, what... r34692 came before r34691? 20090410 20:19:34< Polarina> OMG! 20090410 20:19:42 * Polarina is getting sick. 20090410 20:20:01 * Ivanovic is doing magic! 20090410 20:20:16< Polarina> :O 20090410 20:22:10-!- grzywacz [n=grzywacz@wesnoth/developer/grzywacz] has quit [Remote closed the connection] 20090410 20:29:52-!- cjhopman [n=chris@wesnoth/developer/cjhopman] has quit ["Konversation terminated!"] 20090410 20:34:08-!- stikonas [n=stikonas@wesnoth/translator/stikonas] has quit [Read error: 104 (Connection reset by peer)] 20090410 20:38:01-!- voris [n=voris@c-24-16-107-149.hsd1.wa.comcast.net] has joined #wesnoth-dev 20090410 20:39:01-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 20:41:31-!- molgrum [n=molgrum@c83-249-53-163.bredband.comhem.se] has quit [Read error: 54 (Connection reset by peer)] 20090410 20:41:42-!- molgrum [n=molgrum@c83-249-53-163.bredband.comhem.se] has joined #wesnoth-dev 20090410 20:46:52-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 110 (Connection timed out)] 20090410 21:11:28< Reisiger> Q: Where can i find a function to check if a unit is on a specific tile of the map? (trying to do a 'look around' to search for healers directly next to a unit) 20090410 21:13:27< benetnash> Reisiger: you mean find units near some hex? 20090410 21:14:44< Reisiger> benetnash: Yes. I want to iterate through the units on the map, sort out who's part of the current side or allied, helable, then wounded/poisoned, and then look at the 6 tiles surrounding the unit for a healer 20090410 21:14:57< Reisiger> *healable 20090410 21:15:21-!- grzywacz [n=grzywacz@wesnoth/developer/grzywacz] has joined #wesnoth-dev 20090410 21:16:39-!- ABCD [n=ABCD@wikipedia/ABCD] has quit [Read error: 113 (No route to host)] 20090410 21:16:40< benetnash> well, to get number of units around given you can use something like that size(filter(adjacent_locs(loc(13,15)), 'loc', unit_at(loc))) 20090410 21:16:40< Reisiger> but I am still looking for functions to look up locations and units on locations. 20090410 21:17:03< benetnash> and add filter to choose only friendly units 20090410 21:18:08< Crab_> Reisiger: you can try something like filter(my_units, expression ) 20090410 21:18:56< benetnash> Crab_: yes, filter(my_units, distance_between)) is better ;) 20090410 21:20:06< CIA-30> mordante * r34693 /trunk/CMakeLists.txt: 20090410 21:20:06< CIA-30> Remove the fontconfig test for MSVC. 20090410 21:20:06< CIA-30> When using MSVC fontconfig is not used so no need to test for it. 20090410 21:20:08< CIA-30> mordante * r34694 /trunk/src/map.hpp: Remove unneeded includes. 20090410 21:20:23< CIA-30> mordante * r34695 /trunk/src/ (4 files in 2 dirs): Remove unneeded includes. 20090410 21:20:31< CIA-30> mordante * r34696 /trunk/src/ (filesystem.cpp loadscreen.cpp loadscreen.hpp): Remove unneeded includes. 20090410 21:20:34< CIA-30> mordante * r34697 /trunk/src/ (9 files in 3 dirs): Remove unneeded includes. 20090410 21:20:39< CIA-30> mordante * r34698 /trunk/src/server/ (5 files): Remove unneeded includes. 20090410 21:20:43< CIA-30> mordante * r34699 /trunk/src/server/mail.cpp: Fix indention. 20090410 21:20:48< CIA-30> mordante * r34700 /trunk/src/ (serialization/parser.hpp tools/exploder_cutter.cpp): Remove unneeded includes. 20090410 21:20:52< CIA-30> mordante * r34701 /trunk/src/ (md5.cpp md5.hpp): Remove unneeded includes. 20090410 21:21:02< CIA-30> mordante * r34702 /trunk/src/ (26 files in 4 dirs): Remove unneeded includes. 20090410 21:23:57< Polarina> Yay for unneeded includes! 20090410 21:24:19< Polarina> Eww! MD5. 20090410 21:24:31< Polarina> Please, I beg you to migrate to the SHA-2 series. 20090410 21:25:00< loonycyborg> And also please use Mersenne twister for RNG :P 20090410 21:25:14< Polarina> No, the RNG is fine. 20090410 21:27:10 * mordante is surprised some people like our RNG :-P 20090410 21:27:35< mordante> Polarina, feel free to submit a patch for using SHA-2 :-P 20090410 21:28:49< Polarina> mordante: I have a optimised implementation of both SHA-256 and SHA-512, it's written in C99. Interested? 20090410 21:31:09< mordante> I don't have time to implement it so not really 20090410 21:33:13< mordante> afaik MD5 is still rather save 20090410 21:34:21< loonycyborg> AFAIK SHA-* is really advantageous compared to MD5 only in cryptographical applications.. 20090410 21:38:05-!- noy [n=Noy@d75-157-52-251.bchsia.telus.net] has joined #wesnoth-dev 20090410 21:38:24-!- fendrin [n=fabi@g226208145.adsl.alicedsl.de] has joined #wesnoth-dev 20090410 21:39:10-!- gabm [n=Gabriel@72.0.215.2] has joined #wesnoth-dev 20090410 21:42:50-!- busfahrer [n=busfahre@unixboard/user/busfahrer] has joined #wesnoth-dev 20090410 21:43:19-!- cjhopman [n=chris@wesnoth/developer/cjhopman] has joined #wesnoth-dev 20090410 21:44:29-!- yann [n=dwitch@nan92-1-81-57-214-146.fbx.proxad.net] has joined #wesnoth-dev 20090410 21:50:34< res|laptop> can anyone map "Mark de Wever" to a nickname? 20090410 21:51:03< zookeeper> mordante 20090410 21:51:10< res|laptop> thanks 20090410 21:51:28< mordante> res|laptop, you have a question? 20090410 21:51:46< res|laptop> more like a statement 20090410 21:51:49< res|laptop> at least first 20090410 21:52:06< res|laptop> about memory hogs: 20090410 21:53:21< res|laptop> running valgrind's massif, a lot of memory seems to be allocated for SDL surfaces - probably not much that can be done there, but maybe tweaking some flags or some tricks like cropping could reduce that 20090410 21:53:35< res|laptop> another thing seems to be the preprocessor 20090410 21:53:45< res|laptop> causing some sizeable allocations 20090410 21:54:06< res|laptop> though they're probably only temporary I guess 20090410 21:54:20-!- Ambushsabre [n=ambushsa@c-75-67-216-121.hsd1.nh.comcast.net] has joined #wesnoth-dev 20090410 21:54:26< res|laptop> still, maybe some memory can be saved by using ropes or so for preprocessor output... 20090410 21:56:01-!- noy [n=Noy@wesnoth/developer/noy] has quit [] 20090410 21:57:15< res|laptop> so... I guess the question would be "what do you think?" 20090410 21:58:37< Shadow_Master> mordante: no idea, why do you as k me? 20090410 21:58:45< Shadow_Master> mordante: I have nothing to do with its authoring or maintenance. 20090410 22:04:31< mordante> IIRC we already use RLE compression on the SDL surfaces so not much to gain there 20090410 22:05:10< Shadow_Master> I was talking about DM btw 20090410 22:05:24< mordante> regarding the preprocessor I also think the memory is used only temporary so saving much there also doesn't help much 20090410 22:05:40< mordante> Shadow_Master, I thought you were involved 20090410 22:05:59< Shadow_Master> mordante: I am the repository administrator. 20090410 22:06:14< Shadow_Master> like Ivanovic, I'm not directly responsible for my developers' breakage ;) 20090410 22:07:03< mordante> but we still hold Ivanovic responsible :-P 20090410 22:07:20< CIA-30> loonycyborg * r34703 /trunk/src/server/forum_user_handler.cpp: Fixed compile errors with forum_user_handler enabled. 20090410 22:15:14< mordante> I'm off night 20090410 22:15:32-!- mordante [n=mordante@wesnoth/developer/mordante] has quit ["Leaving"] 20090410 22:18:23-!- fabi [n=fabi@wesnoth/developer/fendrin] has joined #wesnoth-dev 20090410 22:21:50-!- thaer89 [n=thaer89@80.90.168.4] has quit [Read error: 104 (Connection reset by peer)] 20090410 22:24:54-!- Alesis-Novik [n=alesis@77.91.189.10] has joined #wesnoth-dev 20090410 22:28:36-!- Alesis-Novik [n=alesis@77.91.189.10] has quit [Read error: 60 (Operation timed out)] 20090410 22:28:50-!- Alesis-Novik [n=alesis@77.91.189.10] has joined #wesnoth-dev 20090410 22:30:09< zookeeper> esr, fabi, Hm was trying this new campaign: Delfadors Memoirs, I think there is a bug in the level "The Portal of Doom", only the first of my player units that I move to the tunnel at the end is removed, after that moving units to that spot does nothing. 20090410 22:32:11< benetnash> Crab_: there must be some bug in chance_to_kill field in attacks variable. Elvish scout cannot kill vampire bat in one attack, but has chance_to_kill 45% 20090410 22:33:14< Crab_> benetnash: I'll take a look.. 20090410 22:34:09< benetnash> ok, just use choose(attacks, chance_to_kill) 20090410 22:34:28-!- fendrin [n=fabi@wesnoth/developer/fendrin] has quit [Read error: 113 (No route to host)] 20090410 22:36:27-!- Elvish_Pillage2 [n=eli@66-189-40-122.dhcp.oxfr.ma.charter.com] has joined #wesnoth-dev 20090410 22:36:43< Crab_> how can I view that chance-to-kill ? 20090410 22:36:50< Crab_> in a test scenario, for example 20090410 22:39:06< benetnash> debug_print(choose(attacks, chance_to_kill)) - AI will perform attack with maximal chance to kill. Then just look that it was impossible to kill unit in one strike. In log whole attacks will be dumped, just search for chance_to_kill 20090410 22:39:33< benetnash> or map(attacks, chance_to_kill) to see all chances 20090410 22:40:24< fabi> zookeeper: thank you. will fix it at once. 20090410 22:40:40< zookeeper> fabi, i just looked into it myself, looks like just a missing first_time_only=no 20090410 22:40:47< zookeeper> but i'll let you handle it 20090410 22:43:38-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 22:44:07-!- AnMaster [n=AnMaster@unaffiliated/anmaster] has joined #wesnoth-dev 20090410 22:44:11< AnMaster> hello 20090410 22:44:24< AnMaster> http://rafb.net/p/0HD0mx75.html build error on 34703 20090410 22:44:50< AnMaster> one of those huge C++ "instantiated from" thingies 20090410 22:45:28< CIA-30> fendrin * r34704 /trunk/data/campaigns/Delfadors_Memoirs/scenarios/19_the_portal_of_doom.cfg: Added missing attribute to the enter the mine event. 20090410 22:45:36< AnMaster> meh seems pastebin messed up some of the output by changing ‘ to ‘ 20090410 22:45:45< cjhopman> AnMaster: i think i know the problem, give me a sec 20090410 22:45:50< AnMaster> ah :) 20090410 22:46:15< zookeeper> AnMaster, and there's your DM fix too.. 20090410 22:46:21< AnMaster> indeed :) 20090410 22:46:46< cjhopman> nope, i dont 20090410 22:46:59< AnMaster> btw, I didn't get scons to work, it gave internal errors when I tried to use it, I may just have used it wrong I guess. The cmake one works like a charm, but I may be biased here since I used cmake quite a lot myself. 20090410 22:47:15< AnMaster> cjhopman, hm ok. I know C but not C++ so I can't be of much help here :/ 20090410 22:47:23< AnMaster> anything you want me to check? 20090410 22:48:18< fabi> zookeeper: I can't filter for an item? 20090410 22:48:24< AnMaster> cjhopman, it worked a few revisions ago, 34668 or so I think, (I just noticed my wesnoth build was slightly older than I though) 20090410 22:48:36< cjhopman> yeah 20090410 22:48:39< cjhopman> i know the problem 20090410 22:48:49< fabi> zookeeper: like [location_filter] icon=blah 20090410 22:49:08< AnMaster> oh ok 20090410 22:49:19< benetnash> Crab_: also i thought,that with notation [a,a,a,a] where a = debug_print(1) evaluates a only once, but in log I have '1' repeated 4 times. Is it a bug? 20090410 22:49:21< zookeeper> fabi, yeah, you can't 20090410 22:49:38< Crab_> no, this is not a bug 20090410 22:49:52< Crab_> this is a current-state-of-things 20090410 22:50:06< AnMaster> meh reloading from turn save doesn't work 20090410 22:50:15< AnMaster> I guess I'll have to restart that scenario 20090410 22:50:30< Crab_> benetnash: change-to-kill works fine in smaller test case... 20090410 22:50:40< Crab_> can you give me exact-steps-to-repeat ? 20090410 22:51:00-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 110 (Connection timed out)] 20090410 22:51:03< benetnash> wait, I'll send you savegame where this happens 20090410 22:51:07< Crab_> ok 20090410 22:51:11-!- Ambushsabre [n=ambushsa@c-75-67-216-121.hsd1.nh.comcast.net] has quit [Read error: 104 (Connection reset by peer)] 20090410 22:51:26< Crab_> (I'm Crab on forums, if you do so via forum PM) 20090410 22:52:04< cjhopman> what do you guys think, should #include "log.hpp" pull in as well? 20090410 22:52:15-!- Blueblaze [n=nick@c-98-199-143-139.hsd1.tx.comcast.net] has joined #wesnoth-dev 20090410 22:52:28< cjhopman> or should you have to include both of them to do logging? 20090410 22:52:44< AnMaster> hm 20090410 22:53:01< AnMaster> cjhopman, is the issue just a missing include? And if so how comes this compiled for anyone 20090410 22:53:01-!- Elvish_Pillager [n=eli@66-189-40-122.dhcp.oxfr.ma.charter.com] has quit [Read error: 110 (Connection timed out)] 20090410 22:53:23< AnMaster> huh 20090410 22:53:36< AnMaster> well I can use the slightly older binary for now it seems. 20090410 22:53:53< cjhopman> my feeling is that you should only have to include log.hpp 20090410 22:53:56< benetnash> Crab_: http://czystybeton.pl/~benetnash/chance_to_kill.gz 20090410 22:54:18< cjhopman> as you shouldnt really care about how logging is implemented... 20090410 22:54:50< benetnash> when you load game see, that map(attacks, chance_to_kill) return values greater than 0 but there is no way to kill any enemy in one attack 20090410 22:56:14< Crab_> benetnash: there is ) 20090410 22:56:39< Crab_> scout at 16,11 is strong, it has ~1.1% chance of killing that bat0 20090410 22:57:29< Crab_> that is probably those 1s, but there's still 17and45s... 20090410 22:57:35< fabi> Shadow_Master: Have you seen http://www.wesnoth.org/forum/viewtopic.php?p=351210#p351210 ? sounds interresting. 20090410 22:58:25< Shadow_Master> hold on, I just resurrected from a horrible death 20090410 22:59:41< benetnash> yes, but chance_to_kill contains value in % so 45% is too much for this savegame. 20090410 22:59:57< Crab_> yes, that looks strange. 20090410 23:01:04< Shadow_Master> fabi: really weird. I'll try to reproduce later 20090410 23:04:07< Crab_> benetnash: print [attacks] and see the [units] attribute 20090410 23:05:01< benetnash> Crab_: this attack with 45% chance to kill is from (8,9) to (10,12) and attacking bat 20090410 23:05:36< Crab_> benetnash: wait a second, i'll test ... 20090410 23:06:35< cjhopman> those attack are using multiple attackers 20090410 23:06:43< cjhopman> s/attack/attacks/ 20090410 23:07:14< Crab_> benetnash: no. this is attack by "several" units on that poor bat 20090410 23:07:41< Crab_> benetnash: launch any map in mp "you vs comp" 20090410 23:07:52< Shadow_Master> my system's uptime went zero :( 20090410 23:08:10< Crab_> benetnash: create a goblin wolf rider with 32 hp somewhere far from leaders 20090410 23:08:17< Crab_> benetnash: give it to the enemy 20090410 23:08:37< cjhopman> is there a way to send that fai output to stdout? other than --log-x=x 20090410 23:09:10-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has quit [Read error: 104 (Connection reset by peer)] 20090410 23:09:25-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 23:09:30-!- oak_ [n=oakus@252.108.broadband12.iol.cz] has joined #wesnoth-dev 20090410 23:09:33< cjhopman> for example stdout([attacks])? 20090410 23:09:47< benetnash> cjhopman: logs from --log-x are going to stderr afaik 20090410 23:10:03-!- oak__ [n=oakus@252.108.broadband12.iol.cz] has joined #wesnoth-dev 20090410 23:10:33< Crab_> benetnash: then, create a drake warrior near that goblin. 20090410 23:11:00< Crab_> benetnash: then, see [attacks]. there'll be one attack with 21% to kill 20090410 23:11:16< Crab_> benetnash: then, add another drake warrior near that gobin. and see [attacks] 20090410 23:11:25< cjhopman> benetnash: that's true 20090410 23:11:33-!- res|laptop [n=res@pdpc/supporter/student/res2k] has quit [Remote closed the connection] 20090410 23:11:34< cjhopman> a way to send it to either would be fine 20090410 23:12:27< Crab_> benetnash: you'll have 4 attacks. with drake1 (21% ctk), with drake1+drake2(82% ctk), with drake2 (21% ctk), with drake2+drake1(82% ctk) 20090410 23:14:15< benetnash> Crab_: ok, so chance_to_kill is chance to kill that unit in this round not this attack 20090410 23:14:25< benetnash> *this turn 20090410 23:14:46-!- |Andylee| is now known as Andylee 20090410 23:15:03< Crab_> no. it is a chance to kill that unit using any possible combination of your units. 20090410 23:15:39< Crab_> each attack has .units attribute, which holds the list of units that are used for this attack 20090410 23:15:45< voris> Is there a newline escape key I can embed in message strings? 20090410 23:15:56< voris> er, for WML 20090410 23:16:21< voris> I seem to remember someone mentioning one late last year but I can't find it in my logs to save my life. 20090410 23:16:45< benetnash> Crab_: so attack isn't just an simple action (move and attacks given unit) but whole chain of attack on one unit? 20090410 23:17:09< Crab_> attack is not an action by itself 20090410 23:17:25< Crab_> attacks is the array of 'attack analysis' results 20090410 23:18:35< Shadow_Master> http://libregamewiki.org/Battle_for_Wesnoth <- this it outdated; it mentions isaac as the release manager though Ivanovic replaced him years ago 20090410 23:18:35< Crab_> each attack analysis uses 1..N units to try to attack 20090410 23:18:54< Crab_> benetnash: and there's resource_used attribute there - total cost of those units used to attack 20090410 23:19:29< Ivanovic> Shadow_Master: stuff is often outdated... 20090410 23:19:34< Ivanovic> if you got an account there: fix it 20090410 23:19:52< isaac> Shadow_Master: :( 20090410 23:19:54< Shadow_Master> no and I don't want to register another account for a one-time edit 20090410 23:19:57< Shadow_Master> ;( 20090410 23:20:01< isaac> wuhaha 20090410 23:20:02< isaac> awesome 20090410 23:20:08< isaac> i'll be the RM forever there 20090410 23:20:36-!- busfahrer [n=busfahre@unixboard/user/busfahrer] has quit ["leaving"] 20090410 23:20:37< benetnash> Crab_: onece again: thanks for help ;) 20090410 23:20:40< voris> No account necessary :P 20090410 23:20:41< Shadow_Master> poor Ivanovic, nobody appreciates his job :( 20090410 23:20:44< benetnash> s/onece/once/ 20090410 23:22:26< Shadow_Master> isaac: oops. 20090410 23:22:39< Shadow_Master> I put Ivanovic in your place 20090410 23:22:40< Ivanovic> Shadow_Master: this way i can easily say "wasn't me!" 20090410 23:22:52< Shadow_Master> * just put 20090410 23:22:52< Ivanovic> argh, now i have to should it?!? 20090410 23:23:14< Ivanovic> and i think west is doing the music stuff now, not aleksi 20090410 23:23:38< Ivanovic> and this list is lovely empty, too: http://libregamewiki.org/Battle_for_Wesnoth_contributors 20090410 23:24:15< Shadow_Master> yeah, it doesn't even mention kitty, esr or mordante (to name a few noteworthy devs) 20090410 23:24:42< Ivanovic> boucman and many others ain't mentioned either 20090410 23:24:49< isaac> Shadow_Master: damn! 20090410 23:24:57< Shadow_Master> :D 20090410 23:25:22< esr> Looks to me like that list is old and hasn't been kept up. 20090410 23:25:22< Crab_> but they are mentioned here -> http://www.ohloh.net/p/wesnoth/contributors )) 20090410 23:25:49< Shadow_Master> yup. 20090410 23:25:57< Shadow_Master> http://libregamewiki.org/Battle_for_Wesnoth_release_history is well updated though 20090410 23:26:11< benetnash> Crab_: so attacks has wrong description on wiki - it's not list of all possible attacks but list of best attacks evaluated by attack analysis 20090410 23:27:08-!- oak_ [n=oakus@252.108.broadband12.iol.cz] has quit [Success] 20090410 23:27:12 * Shadow_Master stumbled upon that wiki while running a google search for frogatto 20090410 23:27:43< Crab_> benetnash: yes, it's rather incomplete in the wiki ) 20090410 23:27:53 * fabi is listed with primary language emacs lisp. 20090410 23:28:09< benetnash> Crab_: so there is no way to get list of all possible attacks... 20090410 23:28:43< Shadow_Master> fabi: ? 20090410 23:29:26< fabi> Shadow_Master: http://www.ohloh.net/p/wesnoth/contributors?page=2 20090410 23:30:14-!- oak__ [n=oakus@252.108.broadband12.iol.cz] has quit [Connection timed out] 20090410 23:30:40< Shadow_Master> haha, yeah, it doesn't know of WML 20090410 23:30:46< Crab_> benetnash: there's evil things like [filter(attacks,units.size=1)] 20090410 23:31:14< Crab_> benetnash: but of course it can be made better and faster... 20090410 23:31:47-!- Reisiger [n=Reisiger@adsl-89-217-6-44.adslplus.ch] has quit ["Verlassend"] 20090410 23:31:47< Shadow_Master> my primary language is C++ ? :o oh, wait, that's true :) 20090410 23:32:37-!- Gnutoo [n=gnutoo@host155-29-dynamic.17-79-r.retail.telecomitalia.it] has joined #wesnoth-dev 20090410 23:34:03-!- Turuk_ [n=Turuk@wesnoth/forumsith/turuk] has joined #wesnoth-dev 20090410 23:35:12< benetnash> Crab_: but look, that it doesn't return all possible attacks. Look at my saved game. Scout at 8,9 has 7 possible attacks but filter(attacks,units.size=1) return 2 - one attack for bat and one for ghost 20090410 23:35:21< fabi> Shadow_Master: But emacs lisp could be true for me as well. I commit the emacs wml mode for that poor australian boy who doesn't get any credit for it. 20090410 23:35:37< Crab_> benetnash: yes, it picks "best" hex to attack from for each unit... 20090410 23:35:46< Crab_> benetnash: that's unwanted behavior ? 20090410 23:37:48< benetnash> Crab_: well, the target of my diploma work is to evolve AI, so during evoluton AI has to discover which move is the best on his own. On the other hand this will make evolution easier 20090410 23:38:40< Crab_> benetnash: no, it's basically only decision "from what hex to attack" ? and it is chosen by finding tile with maximum defence on it.... 20090410 23:39:28< Crab_> benetnash: but, if it is needed, we can get 'entire list of attacks', too.. 20090410 23:41:41-!- Turuk [n=Turuk@wesnoth/forumsith/turuk] has quit [Connection timed out] 20090410 23:42:12< esr> Shadow_Master: You, and others, may want to look at this page I just created: http://www.wesnoth.org/wiki/SecretLore 20090410 23:42:47< Shadow_Master> zomg, spoiler bomb, me wants! 20090410 23:43:27< benetnash> Crab_: it would be great. Ont only for me but for other developers who want to write own AI. Also maximum defence is not always the best possible place to attack, maybe my AI will find some better formula to determine it :) 20090410 23:43:28-!- oak_ [n=oakus@252.108.broadband12.iol.cz] has joined #wesnoth-dev 20090410 23:43:48< Ivanovic> Shadow_Master: and as you can see, importing translations for DM from wescamp at least resulted in *some* translated strings: http://www.wesnoth.org/gettext/?package=wesnoth-dm&order=trans&version=trunk 20090410 23:49:13< AnMaster> another bug in the DM campaign, I'm at the level "Clash at the manor", Delfador was a "Mage Magister" at last level I was controlling him at, now he is suddenly a "Journeyman Mage" again. 20090410 23:49:14< AnMaster> :( 20090410 23:49:32-!- cjhopman [n=chris@wesnoth/developer/cjhopman] has quit ["Konversation terminated!"] 20090410 23:50:33 * AnMaster have no idea who to highlight in here about that. 20090410 23:50:49< AnMaster> has* 20090410 23:51:35< AnMaster> delfador isn't even in the save file, I just checked 20090410 23:51:38< Ivanovic> AnMaster: probably fendrin and/or esr 20090410 23:51:50< AnMaster> wow cool I met esr ;) 20090410 23:52:08 * AnMaster has used C-INTERCAL btw 20090410 23:53:04< AnMaster> anyway. I'll try to find what safe file delfador was first lost in 20090410 23:54:52 * Shadow_Master tries to summon alink 20090410 23:55:03< Ivanovic> Shadow_Master: good idea 20090410 23:55:10< Shadow_Master> alink: We need you! er, Jetryl and I need you! 20090410 23:55:12< Ivanovic> IIRC he wanted to get something into 1.6.1 20090410 23:55:24< AnMaster> the unit for Delfador exists in DM-Prince_of_Wesnoth.gz but not DM-Clash_at_the_manor.gz 20090410 23:55:28< AnMaster> mh 20090410 23:58:39-!- Alesis-Novik [n=alesis@77.91.189.10] has quit [""Back in a few days""] --- Log closed Sat Apr 11 00:00:06 2009