--- Log opened Thu Oct 25 00:00:15 2012 20121025 00:08:42< Alarantalara> Well the problems I noticed with the last release seem to be gone 20121025 00:09:43< mattsc> Cool. 20121025 00:12:17< Alarantalara> Can we get it to keep a unit on the left if an enemy can get there in 2 turns? 20121025 00:12:58< mattsc> If the enemy can get to the first village in 2 turns or so? Sure. 20121025 00:13:45-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20121025 00:13:49< Alarantalara> That would be very helpful in keeping me from just walking in with a unit after the first two units have killed themselves 20121025 00:14:29< mattsc> Yep. I also want to keep those two units from killing themselves. Or at least slow them down a little. 20121025 00:16:42< mattsc> I have to sign off now. I'll be back later today and will read the logs, if there's something else. 20121025 00:19:09-!- mattsc [~mattsc@fw.hia.nrc.ca] has quit [Quit: bye] 20121025 00:22:59-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 244 seconds] 20121025 00:44:48-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20121025 02:16:12-!- Alarantalara [~Adium@CPEc0c1c09e8055-CM00252eac6d62.cpe.net.cable.rogers.com] has quit [Quit: Leaving.] 20121025 02:27:43-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20121025 02:31:48-!- ancestral [~ancestral@mobile-198-228-232-196.mycingular.net] has joined #wesnoth-umc-dev 20121025 02:38:14-!- ancestral [~ancestral@mobile-198-228-232-196.mycingular.net] has quit [Remote host closed the connection] 20121025 02:38:37-!- ancestral [~ancestral@mobile-198-228-232-196.mycingular.net] has joined #wesnoth-umc-dev 20121025 02:40:50-!- mattsc [~mattsc@d154-20-32-241.bchsia.telus.net] has joined #wesnoth-umc-dev 20121025 02:47:57-!- ancestral [~ancestral@mobile-198-228-232-196.mycingular.net] has quit [Remote host closed the connection] 20121025 02:48:21-!- ancestral [~ancestral@mobile-198-228-232-196.mycingular.net] has joined #wesnoth-umc-dev 20121025 02:52:33-!- ancestral [~ancestral@mobile-198-228-232-196.mycingular.net] has quit [Client Quit] 20121025 03:02:05-!- faabumc [~vcr@120.196.59.130] has joined #wesnoth-umc-dev 20121025 03:04:35-!- Alarantalara [~Adium@CPEc0c1c09e8055-CM00252eac6d62.cpe.net.cable.rogers.com] has joined #wesnoth-umc-dev 20121025 03:05:28< Alarantalara> mattsc: Is something special happening with the leader? Fred seems to take extra long when the leader has possible attacks, and it gets slower the more there are 20121025 03:05:42< Alarantalara> Current record is over 800 seconds 20121025 03:16:24< mattsc> Alarantalara: 800 seconds, wow! 20121025 03:17:06< mattsc> When Fred is considering the leader to move, he's doing a counter attack calculation, and that's where it gets really expensive. 20121025 03:17:18< mattsc> (same happens for trapping attacks) 20121025 03:17:41-!- faabumc [~vcr@120.196.59.130] has quit [Ping timeout: 255 seconds] 20121025 03:18:09-!- faabumc [~vcr@120.196.59.130] has joined #wesnoth-umc-dev 20121025 03:18:15< mattsc> Because then for every attack combination, you have to go through all the enemy attack combinations. So it suddenly goes as the square of combinations. 20121025 03:18:27-!- ancestral [~ancestral@75-161-178-116.mpls.qwest.net] has joined #wesnoth-umc-dev 20121025 03:19:09< mattsc> What I did today is to store attack combinations (one unit on one one) that have been calculated already, which reduced time needed significantly, but it's still possible for it to take a long time. 20121025 03:21:53< mattsc> I'm not sure exactly how to deal with this yet. I could build in some quicker, but approximate counter attack pre-selection. Or I could simply cut it off after a certain amount of time has passed. Suggestions welcome! 20121025 03:27:31< Alarantalara> Can you cut it off once you find something good enough? 20121025 03:28:06< Alarantalara> For instance, if the chance to kill > 80%, stop since that's clearly good enough 20121025 03:28:28< Alarantalara> Or even if > 95% 20121025 03:28:40< Alarantalara> though that may not have much of an effect 20121025 03:29:17< Alarantalara> but for counter attacks against the leader, you know it's bad if >50%, so there's no need to find out how bad 20121025 03:34:34< Alarantalara> Or even just evaluate only the attack that consists of the N units able to do the most damage 20121025 03:36:18< mattsc> I am already using only the combinations that have the most amount of units. 20121025 03:36:49< mattsc> But yes, something along those lines is what I am thinking about for the leader. For other units it's not quite as clear cut. 20121025 03:36:57< Alarantalara> I had 9 units who could attack from all 6 locations. 20121025 03:37:03< Alarantalara> So 84 combinations of 6 units 20121025 03:37:34< Alarantalara> And if you did it from every hex they could reach, it's something like 60,000 possibilities 20121025 03:37:58< mattsc> yeah, I know. I need some pre-selection. 20121025 03:38:38< mattsc> I only got to the point where I'm at now a few hours ago, I'll get back to it soon. 20121025 03:39:37< Alarantalara> Just so you can see what happened: http://imagebin.org/233171 20121025 03:41:16< mattsc> Oh, yeah, I can see how that would take a long time. And in this case it really doesn't matter a whole lot anyway. 20121025 03:42:59< mattsc> Well, I'm out of time for today. I'll get back onto this again soon. Cheers. 20121025 03:43:06< Alarantalara> I suppose the other option is to implement surrendering before dying 20121025 03:43:21< Alarantalara> Bye for now, then 20121025 03:45:59-!- ancestral [~ancestral@75-161-178-116.mpls.qwest.net] has quit [Quit: Smell ya later!] 20121025 03:47:19-!- ancestral [~ancestral@75-161-178-116.mpls.qwest.net] has joined #wesnoth-umc-dev 20121025 04:13:07-!- loonybot [~loonybot@wesnoth/bot/loonybot] has quit [Remote host closed the connection] 20121025 04:24:58< mattsc> Alarantalara: quick question. Is there a way to get the real damage (as opposed to the nominal weapon damage) of a single strike for a specific pair of units without having to do a simulate_combat? 20121025 04:25:35< Alarantalara> I don't think so 20121025 04:25:48< mattsc> Ok, that's what I thought. 20121025 04:26:41< Alarantalara> It would be nearly impossible: base, time of day, leadership, charge, backstab, UMC abilities (including ones that are terrain specific) 20121025 04:27:43< mattsc> Well, the engine does it when attacking, so it must be in there somewhere. Whether it's accessible is a different question. 20121025 04:29:50< mattsc> I do have some ideas how to deal with the counter attack thing. The problem is that I want an algorithm that produces the "exact" result when it can, but that still works when there are 60,000 combinations. 20121025 04:30:38< mattsc> I'll probably put in something like: if N>100 then use appoximate method. 20121025 04:31:56< mattsc> Anyways, I'm off again. Just wanted to ask that quickly. 20121025 04:36:53-!- un214 [~un214@108.221.231.191] has joined #wesnoth-umc-dev 20121025 04:49:32-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20121025 04:56:07< mattsc> Alarantalara: so I've been playing with this a bit more after all. There's something I just learned about Lua (probably about memory management) 20121025 04:57:00< mattsc> I recreated your situation and there are (at first) roughly 125,000 (times 8, later) combinations. 20121025 04:57:24< mattsc> I then eliminate those that have fewer than the max number of attackers (6 in this case). I do this by: 20121025 04:57:43< mattsc> for i=#att,1,-1 do 20121025 04:57:57< mattsc> if some_condition table.remove(table, i) 20121025 04:57:58< mattsc> end 20121025 04:58:51< mattsc> This gets _really_ slow after a while. My guess is that table.remove internally makes copies of the table each time it is called, and that there's a lot of garbage in the memory that doesn't get collected until later. 20121025 04:59:34< mattsc> Sorry, "after a while" meaning: the close 'i' gets to 1, the slower it gets. 20121025 05:03:30< mattsc> Ah, yes, much better. Instead of deleting entries from the array, I now build a new array for those entries that meet the opposite condition. That takes essentially no time. 20121025 05:17:15< mattsc> And I was off slightly: http://pastebin.com/i9tj5qgm 20121025 05:18:20-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Quit: shadowm_laptop] 20121025 05:18:22< mattsc> Only 318.658 combinations, and 73.120 Fred is actually evaluating. :) 20121025 05:36:37-!- Alarantalara [~Adium@CPEc0c1c09e8055-CM00252eac6d62.cpe.net.cable.rogers.com] has quit [Quit: Leaving.] 20121025 05:39:37-!- Alarantalara [~Adium@CPEc0c1c09e8055-CM00252eac6d62.cpe.net.cable.rogers.com] has joined #wesnoth-umc-dev 20121025 05:40:06-!- Alarantalara [~Adium@CPEc0c1c09e8055-CM00252eac6d62.cpe.net.cable.rogers.com] has left #wesnoth-umc-dev [] 20121025 06:01:17-!- faabumc [~vcr@120.196.59.130] has quit [Quit: Ex-Chat] 20121025 06:19:28-!- un214 [~un214@108.221.231.191] has quit [Remote host closed the connection] 20121025 07:47:17-!- faabumc [~vcr@113.64.65.230] has joined #wesnoth-umc-dev 20121025 09:05:57-!- ancestral [~ancestral@75-161-178-116.mpls.qwest.net] has quit [Quit: And that’s the end of THAT chapter.] 20121025 09:37:46-!- faabumc [~vcr@113.64.65.230] has quit [Quit: Ex-Chat] 20121025 10:40:34-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20121025 12:16:36-!- Cookiee [~quassel@60-240-54-150.tpgi.com.au] has joined #wesnoth-umc-dev 20121025 12:16:36-!- Cookiee [~quassel@60-240-54-150.tpgi.com.au] has quit [Changing host] 20121025 12:16:36-!- Cookiee [~quassel@unaffiliated/cookiee] has joined #wesnoth-umc-dev 20121025 12:17:12-!- Cookiee is now known as Cookie 20121025 12:19:27-!- Cookie is now known as Cookiee 20121025 12:19:30-!- Cookiee is now known as Cookie 20121025 13:08:14-!- Cookie [~quassel@unaffiliated/cookiee] has quit [Remote host closed the connection] 20121025 13:57:24-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20121025 15:19:07-!- mattsc [~mattsc@d154-20-32-241.bchsia.telus.net] has quit [Quit: bye] 20121025 15:20:11-!- loonybot [~loonybot@ppp94-29-12-11.pppoe.spdop.ru] has joined #wesnoth-umc-dev 20121025 15:20:11-!- loonybot [~loonybot@ppp94-29-12-11.pppoe.spdop.ru] has quit [Changing host] 20121025 15:20:11-!- loonybot [~loonybot@wesnoth/bot/loonybot] has joined #wesnoth-umc-dev 20121025 15:20:14-!- mode/#wesnoth-umc-dev [+v loonybot] by ChanServ 20121025 15:30:27-!- faabumc [~vcr@117.136.34.129] has joined #wesnoth-umc-dev 20121025 15:33:49-!- mattsc [~mattsc@71-19-182-26.dedicated.allstream.net] has joined #wesnoth-umc-dev 20121025 15:36:32-!- Cookie [~quassel@60-240-54-150.tpgi.com.au] has joined #wesnoth-umc-dev 20121025 15:36:32-!- Cookie [~quassel@60-240-54-150.tpgi.com.au] has quit [Changing host] 20121025 15:36:32-!- Cookie [~quassel@unaffiliated/cookiee] has joined #wesnoth-umc-dev 20121025 16:04:02-!- Crendgrim [~crend@ip-109-90-218-13.unitymediagroup.de] has joined #wesnoth-umc-dev 20121025 17:02:27-!- faabumc [~vcr@117.136.34.129] has quit [Quit: Ex-Chat] 20121025 17:11:18-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20121025 17:23:08-!- mattsc [~mattsc@71-19-182-26.dedicated.allstream.net] has quit [Quit: I'm asleep] 20121025 18:17:05-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Read error: Connection reset by peer] 20121025 18:40:45-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20121025 18:54:06-!- mattsc [~mattsc@fw.hia.nrc.ca] has joined #wesnoth-umc-dev 20121025 19:34:50-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20121025 21:10:15-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20121025 21:25:53-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20121025 21:37:59-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 255 seconds] 20121025 22:25:20-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 260 seconds] 20121025 22:39:25-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20121025 22:55:45-!- esr_ [~chatzilla@static-71-162-243-5.phlapa.fios.verizon.net] has joined #wesnoth-umc-dev 20121025 23:00:54-!- esr [~chatzilla@wesnoth/developer/esr] has quit [Ping timeout: 240 seconds] 20121025 23:00:55-!- esr_ is now known as esr 20121025 23:24:47-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 245 seconds] 20121025 23:43:14-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20121025 23:45:25-!- esr_ [~chatzilla@static-71-162-243-5.phlapa.fios.verizon.net] has joined #wesnoth-umc-dev 20121025 23:45:29-!- esr [~chatzilla@static-71-162-243-5.phlapa.fios.verizon.net] has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121010234852]] 20121025 23:45:36-!- esr_ is now known as esr 20121025 23:46:25-!- esr [~chatzilla@static-71-162-243-5.phlapa.fios.verizon.net] has quit [Changing host] 20121025 23:46:25-!- esr [~chatzilla@wesnoth/developer/esr] has joined #wesnoth-umc-dev --- Log closed Fri Oct 26 00:00:15 2012