--- Log opened Mon Apr 22 00:00:00 2013 --- Day changed Mon Apr 22 2013 20130422 00:00:00-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130422 00:10:59-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 255 seconds] 20130422 00:11:33-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-umc-dev 20130422 00:13:25-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 248 seconds] 20130422 00:18:13-!- ancestral [~ancestral@mobile-198-228-235-019.mycingular.net] has quit [Quit: Smell ya later!] 20130422 00:36:42< mattsc> AI0867: thanks. I guess that makes sense given that it is called a 'tag'. 20130422 01:00:37-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has left #wesnoth-umc-dev [] 20130422 01:58:47-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130422 01:59:18-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Client Quit] 20130422 02:01:06-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130422 02:54:37-!- irker059 [~irker@ai0867.net] has quit [Quit: transmission timeout] 20130422 02:58:31-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130422 02:59:16-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130422 03:00:13-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Remote host closed the connection] 20130422 03:00:54-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130422 03:20:53-!- loonybot [~loonybot@wesnoth/bot/loonybot] has quit [Remote host closed the connection] 20130422 03:45:11-!- shadowm_desktop [~ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 252 seconds] 20130422 03:45:53< vultraz> shikadibot: dir trunk 20130422 03:45:53<+shikadibot> vultraz: Web interface URL to dir trunk: http://wesnoth-umc-dev.svn.sourceforge.net/viewvc/wesnoth-umc-dev/trunk 20130422 03:47:03-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20130422 03:55:25-!- Crendgrim [~quassel@port-92-204-50-112.dynamic.qsc.de] has quit [Read error: Operation timed out] 20130422 03:59:25-!- Crendgrim [~quassel@port-92-204-108-247.dynamic.qsc.de] has joined #wesnoth-umc-dev 20130422 04:12:46-!- Alarantalara [~Adium@CPEc0c1c09e8055-CM00252eac6d62.cpe.net.cable.rogers.com] has joined #wesnoth-umc-dev 20130422 04:13:28< mattsc> Hi, Alarantalara. So, do you know what I am trying to do with the Goto MAI? 20130422 04:14:14< Alarantalara> I have the impression that you're trying to create an AI that takes an SUF, and an SLF and moves units that match the first to a location in the second 20130422 04:14:19< mattsc> It's essentially a generalized goto CA, where both the units and the goal locations are given by filters (and therefore can be multiples) 20130422 04:14:30< mattsc> Right (simul-typing) 20130422 04:15:04< mattsc> ... and then it should have a bunch of configurable options. 20130422 04:15:21< mattsc> Most of those are implemented, but I'm a bit stuck on the avoid_enemies= key. 20130422 04:15:51< mattsc> Not because I don't know how to program what I want, but because it's too slow. So we'd either need to do it in c++, or come up with a different method. 20130422 04:16:22< mattsc> And I just wanted to brain storm this by you to see if you have some other (better) ideas. 20130422 04:17:03< mattsc> Here's what I'd like: the avoid_enemies parameter should be a number, similar to caution or aggression, that determines how much a unit tries to avoid the enemy. 20130422 04:17:50< mattsc> I was thinking that a value of 1 means that the unit is willing to take a route that is 1 MP longer per enemy threatening the goal hex of the next move. 20130422 04:18:02< mattsc> or 2 MP per enemy if it's set to 2, etc. 20130422 04:18:06< mattsc> Does that make sense? 20130422 04:18:57< Alarantalara> So that would be total length of route? 20130422 04:19:17< mattsc> Well, that's up for debate... 20130422 04:20:10< mattsc> What I was thinking was: from all hexes a unit can reach, calculate the MP needed to all goals, add in #enemies that can reach that hex * avoid_enemies and go with the smallest number. 20130422 04:20:58< mattsc> Not perfect, but it has the advantage that the unit would take the route around the other side of the mountain range if this side is threatened by too many enemies. 20130422 04:22:01< mattsc> But you see the problem, that's lots of path finding, esp. if many units and hexes match the filters. 20130422 04:22:21< Alarantalara> I'm sure there's some horrible trap leading to the units bouncing back and forth, but I can't see it at the moment 20130422 04:22:56< mattsc> I'm sure that's possible, but if avoiding enemies is important, maybe that's what they should be doing ... 20130422 04:23:09< mattsc> Alarantalara: sorry, I have to be afk for 10 min 20130422 04:23:17< Alarantalara> Why not use find_reach once per unit and look up values in it? 20130422 04:23:29< mattsc> If you're not here any more after that, we can continue some other time. 20130422 04:24:01< mattsc> That's what I am doing. But you still need to path-find to all possible goal hexes. 20130422 04:24:20< mattsc> sorry, will be back soon ... 20130422 04:34:22< mattsc> Alarantalara: sorry for that 20130422 04:35:48< mattsc> Alarantalara: the way I am doing it right now is path_find from each hex the unit can reach to each goal hex. 20130422 04:44:16< mattsc> Alarantalara: still around or did I miss my chance? 20130422 04:44:25< Alarantalara> I'm still here 20130422 04:44:52< mattsc> Any comments on any of that? Am I being stupid again? 20130422 04:46:36< Alarantalara> find_reach is being less useful again 20130422 04:47:05< Alarantalara> It knows the shortest route to every location in C++ but you can't get that from Lua 20130422 04:48:03< mattsc> You mean it always does that, every time you call it? 20130422 04:48:41< Alarantalara> not find_path, find_reach. It calculates the shortest path to everywhere at once (which is faster than doing lots of find paths) 20130422 04:49:14< Alarantalara> but then the Lua interface drops the links needed to reconstruct the paths needed 20130422 04:49:35< Alarantalara> so you have to start from scrath with find_path every time 20130422 04:49:46< mattsc> Hmm, interesting. Can we add a lua option (or a separate function) to get that? 20130422 04:50:09< mattsc> pass the information from c++ to lua, I mean 20130422 04:52:14< Alarantalara> Likely. It's just another couple of lines in Lua.cpp 20130422 04:52:23< Alarantalara> You could easily add it as an easy coding task 20130422 04:53:26< mattsc> Alarantalara: cool. And since all of this is for trunk and future releases anyway, we're good with that. 20130422 04:54:15< mattsc> Alarantalara: thanks 20130422 04:54:41< Alarantalara> It might not help unless there is a very large set of destinations. 20130422 04:55:14< Alarantalara> You might want to do something like compare the size of the SLF result with the map size before deciding which to use 20130422 04:56:13< mattsc> Well, what I tried was moving a single bat to any hex on the southern border of the map (about 40 across). That took 7 seconds on my computer. 20130422 04:59:56< mattsc> I'm not sure if what I am imagining will work in the end, but I don't have a better idea at the moment. 20130422 05:00:33< Alarantalara> How did the messenger escort AI do it? 20130422 05:01:09< mattsc> Crab_ also suggested possibly adding the passing a customizable rating function to find_path. It's another option but requires C++ work also. 20130422 05:01:30< mattsc> The ME AI does it like that (IIRC), but it's one unit toward one goal, so no problem. 20130422 05:03:30< Alarantalara> http://pastebin.com/0aH8Dy16 20130422 05:04:00< mattsc> Phew, did you just write that? 20130422 05:04:16< Alarantalara> No, I wrote it for the cave generator 20130422 05:04:28< mattsc> Oh, good. ;) 20130422 05:04:32< Alarantalara> I need to replace a data structure in that so it's more efficient, but it's basically the same search alogrithm as the C++ code but written in Lua 20130422 05:04:49< Alarantalara> with a custom cost function added for fun 20130422 05:06:10< Alarantalara> And that's "really" need if it's going to be at all fast 20130422 05:06:14< mattsc> And that's fast enough to do from hundreds of hexes to a few dozens of hexes for several units in one turn? 20130422 05:07:05< Alarantalara> Probably not yet, but I can rewrite it so it's faster. The next step would be for it to save the intermediate data, so you can pass that back in and get another path 20130422 05:07:31< Alarantalara> So overlapping routes would share data while still being as fast as possible 20130422 05:07:37< mattsc> Yeah, that's something I was thinking as well. Pathfinding is very rendundant. 20130422 05:08:07< Alarantalara> I didn't need that for the single paths I was using this for, but you get the idea 20130422 05:08:21< mattsc> Yes. 20130422 05:08:58< mattsc> So ... are you going to work on that some more anyway, or should I try to work my way through it? (I'm too dense to understand this from a quick look at the code) 20130422 05:10:08< Alarantalara> I'm going to do the data structure switch regardless, and I can certainly clean it up so it isn't using the truly messed up location indexes (which are optimized for the map generation rather than being generally useful) 20130422 05:11:06< mattsc> Ok, that sounds good. Just let me know when you're done with it for your purposes and I'll take over at that point. 20130422 05:11:45-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 276 seconds] 20130422 05:11:54< mattsc> ... or, just to ask the question, would it be easier and much faster anyway to add a custom cost function to the C++ version? 20130422 05:12:25< Alarantalara> It might be. The code in C++ already supports it, it's just hidden from Lua 20130422 05:12:41< mattsc> ok 20130422 05:13:09< Alarantalara> The hard part would be that the custom cost function needs to be able to call back into Lua frequently (which doesn't have an implementation yet) 20130422 05:13:12-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20130422 05:13:34< Alarantalara> So there would need to be a new "Lua cost" C++ function that calls theLua code and gets an answer 20130422 05:14:10< mattsc> The mechanism for this exist though, right? 20130422 05:14:50< Alarantalara> Yes, the existing code has a cost function provided to it. There just needs to be a new one that stores a chunk of Lua and calls it in place 20130422 05:15:21< Alarantalara> It's not trivial, but it's far from hard 20130422 05:15:35< mattsc> Which actually sounds like something one of the GSoC students did for an easy coding task... 20130422 05:16:00< mattsc> Adding a function to let the AI choose which unit type to advance to 20130422 05:18:11< mattsc> Alarantalara: thanks for taking the time to discuss this. I need to move on to some household chores now ... 20130422 05:19:09< mattsc> This isn't something I'll have time to work on in the next week (or possibly more) anyway, so I might ping you again about in a week or so, just to see if you had any additional ideas. 20130422 05:19:18< Alarantalara> sounds good 20130422 05:50:30-!- Alarantalara [~Adium@CPEc0c1c09e8055-CM00252eac6d62.cpe.net.cable.rogers.com] has quit [Quit: Leaving.] 20130422 06:00:13-!- mattsc [~mattsc@d154-20-34-165.bchsia.telus.net] has quit [Quit: bye] 20130422 06:34:54-!- irker146 [~irker@ai0867.net] has joined #wesnoth-umc-dev 20130422 06:34:54< irker146> NX-RPG: Charles Dang :master * dbaf5f5 / images/units/humans/mizenwyn_fake.png: http://git.io/zUA_Yw 20130422 06:34:55< irker146> NX-RPG: Added Fake!Mizenwyn baseframe 20130422 07:44:14-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20130422 08:12:03-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130422 09:09:13-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130422 09:39:30-!- faabumc [~vcr@wesnoth/developer/faabumc] has joined #wesnoth-umc-dev 20130422 09:40:08-!- Blueblaze [~Blueblaze@adsl-76-202-16-62.dsl.hstntx.sbcglobal.net] has quit [Quit: Blueblaze] 20130422 09:40:48-!- faabumc [~vcr@wesnoth/developer/faabumc] has quit [Client Quit] 20130422 10:30:54-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has left #wesnoth-umc-dev [] 20130422 11:50:52-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 256 seconds] 20130422 12:32:21-!- loonybot [~loonybot@37.190.123.35] has joined #wesnoth-umc-dev 20130422 12:32:21-!- loonybot [~loonybot@37.190.123.35] has quit [Changing host] 20130422 12:32:21-!- loonybot [~loonybot@wesnoth/bot/loonybot] has joined #wesnoth-umc-dev 20130422 12:32:24-!- mode/#wesnoth-umc-dev [+v loonybot] by ChanServ 20130422 12:39:41-!- irker146 [~irker@ai0867.net] has quit [Quit: transmission timeout] 20130422 14:26:41-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130422 14:42:37-!- faabumc [~vcr@wesnoth/developer/faabumc] has joined #wesnoth-umc-dev 20130422 15:17:37-!- mattsc [~mattsc@207.230.251.234] has joined #wesnoth-umc-dev 20130422 15:29:42-!- faabumc [~vcr@wesnoth/developer/faabumc] has quit [Read error: Connection reset by peer] 20130422 15:29:45-!- faabumc_ [~vcr@wesnoth/developer/faabumc] has joined #wesnoth-umc-dev 20130422 16:06:51-!- irker700 [~irker@ai0867.net] has joined #wesnoth-umc-dev 20130422 16:06:51< irker700> AI-Demos: mattsc master * r059d239 / lua/grunt-rush-Freelands-S1_engine.lua : Fred zone_hold: remove the advance_distance concept - http://git.io/07HvZg 20130422 16:06:51< irker700> This was used to determine how far in a zone units should advance based 20130422 16:06:51< irker700> on general power ratios. It will be replaced by counter attack 20130422 16:06:51< irker700> calculations. Only comment it out for now as something similar might 20130422 16:06:51< irker700> be needed again later. Note: this might make Fred play a little worse 20130422 16:06:51< irker700> until the switch is finished. 20130422 16:10:18-!- mattsc [~mattsc@207.230.251.234] has quit [Quit: I'm asleep] 20130422 16:28:14-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has quit [Ping timeout: 258 seconds] 20130422 16:29:39-!- mattsc [~mattsc@fw.hia.nrc.ca] has joined #wesnoth-umc-dev 20130422 16:31:04-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has joined #wesnoth-umc-dev 20130422 17:02:39-!- faabumc_ [~vcr@wesnoth/developer/faabumc] has quit [Quit: Ex-Chat] 20130422 18:09:56-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130422 18:47:49-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130422 19:06:52-!- irker700 [~irker@ai0867.net] has quit [Quit: transmission timeout] 20130422 19:50:16-!- irker326 [~irker@ai0867.net] has joined #wesnoth-umc-dev 20130422 19:50:16< irker326> wesnoth-lp8: 8573 :master * 0464a2a / 8680s_Lua_Pack/wml.lua: http://git.io/PUcUMw 20130422 19:50:16< irker326> wesnoth-lp8: wml: Fix infinite loop. 20130422 19:50:17< irker326> wesnoth-lp8: 20130422 19:50:18< irker326> wesnoth-lp8: I had forgotten to increment the induction variable; what a silly 20130422 19:50:19< irker326> wesnoth-lp8: mistake. 20130422 19:50:20< irker326> wesnoth-lp8: 20130422 20:02:39< irker326> NX-RPG: 8573 :master * 4206c50 / lua/lp8/wesnoth-lp8: http://git.io/LRuRYA 20130422 20:02:40< irker326> NX-RPG: Update internal lp8 (fix infinite loop). 20130422 20:25:56< irker326> NX-RPG: Charles Dang :master * 591dd8f / lua/gui/dialogs/inv.lua: http://git.io/hbV1eA 20130422 20:25:57< irker326> NX-RPG: Fixed image path 20130422 20:25:58< irker326> NX-RPG: Charles Dang :master * e200b6f / lua/lp8/wesnoth-lp8: http://git.io/58oG3A 20130422 20:25:59< irker326> NX-RPG: Merge branch 'master' of https://github.com/Vultraz/NX-RPG 20130422 21:19:48-!- mattsc [~mattsc@fw.hia.nrc.ca] has quit [Ping timeout: 256 seconds] 20130422 21:21:23-!- mattsc [~mattsc@fw.hia.nrc.ca] has joined #wesnoth-umc-dev 20130422 22:04:57-!- ancestral [~ancestral@mobile-198-228-234-068.mycingular.net] has joined #wesnoth-umc-dev 20130422 22:05:49-!- ancestral [~ancestral@mobile-198-228-234-068.mycingular.net] has quit [Client Quit] 20130422 22:33:16-!- trewe [~trewe@87-196-85-8.net.novis.pt] has joined #wesnoth-umc-dev 20130422 22:38:58< irker326> AI-Demos: Zazweda master * r9ca8b6c / (3 files in 2 dirs): Adding the zone guardian MAI - http://git.io/YFdABg 20130422 22:41:01-!- Zazweda [~root@str90-h01-212-194-66-6.dsl.sta.abo.bbox.fr] has joined #wesnoth-umc-dev 20130422 22:48:39-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 276 seconds] 20130422 22:54:18-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20130422 22:59:38-!- Zazweda [~root@str90-h01-212-194-66-6.dsl.sta.abo.bbox.fr] has quit [Quit: WeeChat 0.3.7] 20130422 23:04:29-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Read error: Connection reset by peer] 20130422 23:05:50< irker326> AI-Demos: Zazweda master * r47f25ce / micro_ais/ais/mai_guardian_engine.lua : Fixing indentation - http://git.io/fUSSEQ 20130422 23:09:09-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20130422 23:17:56-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 245 seconds] 20130422 23:20:51-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20130422 23:32:44-!- Blueblaze [~Blueblaze@76.202.16.62] has joined #wesnoth-umc-dev 20130422 23:53:00-!- Alarantalara [~Adium@CPEc0c1c09e8055-CM00252eac6d62.cpe.net.cable.rogers.com] has joined #wesnoth-umc-dev --- Log closed Tue Apr 23 00:00:19 2013