--- Log opened Sat Apr 27 00:00:05 2013 20130427 00:38:42-!- irker892 [~irker@ai0867.net] has quit [Quit: transmission timeout] 20130427 00:51:44-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 252 seconds] 20130427 01:02:16< mattsc> skyfaller: you there? 20130427 01:02:28< skyfaller> yo, I'm about to eat dinner, what's up? 20130427 01:02:48< mattsc> Do you have 10 min, or should we do that later? 20130427 01:03:14< skyfaller> I have like 5 minutes, so maybe later 20130427 01:04:00< mattsc> ok - I want to ask you how we can convince Fred to attack in a certain situation, without screwing up other situations. 20130427 01:04:21< mattsc> It's pretty clear what he should do, I am not so certain how to set up the rating function 20130427 01:05:30< mattsc> Here's the situation: http://imagebin.org/255535 20130427 01:05:44< mattsc> (just telling you what I will be talking about, not that we should do it now) 20130427 01:06:32< mattsc> He currently doesn't attack that poisoned mage, because the counter attack damage of all the other enemies is high. 20130427 01:07:02< mattsc> This is set up so that it is not possible to lure him out of the defense with almost-dead units, but obviously that doesn't apply here. 20130427 01:07:25< mattsc> I'll leave it at that for now. Bon appetit! 20130427 01:20:07-!- mattsc [~mattsc@fw.hia.nrc.ca] has quit [Quit: I'm asleep] 20130427 01:40:00-!- Blueblaze [~Blueblaze@adsl-76-202-16-62.dsl.hstntx.sbcglobal.net] has joined #wesnoth-umc-dev 20130427 01:51:02-!- mattsc [~mattsc@d154-20-34-165.bchsia.telus.net] has joined #wesnoth-umc-dev 20130427 02:02:37-!- Blueblaze [~Blueblaze@adsl-76-202-16-62.dsl.hstntx.sbcglobal.net] has quit [Quit: Blueblaze] 20130427 03:00:59< skyfaller> ok, I guess I'm back... 20130427 03:02:03-!- loonybot [~loonybot@wesnoth/bot/loonybot] has quit [Remote host closed the connection] 20130427 03:02:50< skyfaller> I mean, it's worth losing any one of your orcish units to kill that mage, if all XP is equal 20130427 03:03:32< skyfaller> if you're trying to collect XP in a unit, then use the other units to shield that unit 20130427 03:04:16< skyfaller> mages won't really enjoy attacking assassins or archers from flat, regardless of TOD 20130427 03:05:42< skyfaller> I can't tell, would that troll's XP be in the white if he kills that mage? I 20130427 03:07:38< skyfaller> I would hit the mage with the troll from where the assassin is currently standing, follow up with an assassin if the troll misses, then shield the troll from the healthy mage with the 2 assassins and the archer 20130427 03:12:26< skyfaller> if the injured troll on the left has 5 move, put him in the far village, otherwise assume he's dead and just use him to distract the mage+scout from grabbing a village or attacking your defensible units 20130427 03:12:31< mattsc> skyfaller: Hey - I'm not really asking whether it's worth to attack the mage and with what unit. I know it is. 20130427 03:13:02< mattsc> The question I'm having is what is the quantity that Fred can use that tells him that in this case he should attack, whereas in other cases he should not... 20130427 03:13:35< mattsc> I thought counter attack damage would be that number but (as usual) it's not that simple. 20130427 03:13:41< skyfaller> Well, any time you can trade an orc unit for a mage it's probably worthwhile, if XP is equal 20130427 03:14:03< skyfaller> if you could trade assassins for mages all day you would be winning 20130427 03:14:28< skyfaller> trading a troll for a mage is an even better deal, but if he's about to level maybe you want to conserve the XP you've saved up 20130427 03:14:41< mattsc> But, let's assume the mage were a ... whatever, spearman. I'd still want to attack him in this case. 20130427 03:15:37< skyfaller> well, not always... if you're in a bad tactical position where a lot of damage is on the way at day, you don't want to trade expensive units for cheap units 20130427 03:15:46< skyfaller> I would not start trading assassins for spearmen 20130427 03:17:00< mattsc> You can't really decide from this situation though which unit you'll be trading, it entirely depends on the next moves as well 20130427 03:17:06< mattsc> Well, you and I can, but Fred cannot. 20130427 03:17:56< skyfaller> well, if there is a punishment party en route which is bringing enough damage to kill any unit you field, you should still make the attack if you can probably kill it with one unit and retreat everything else out of range 20130427 03:19:20< mattsc> The thing here is, Fred only got himself into this situation because he hasn't attacked that mage in two turns... 20130427 03:19:24< skyfaller> so long as the enemy can't kill more than one unit per turn, it's fine to follow up with other units if you miss, so long as none of the units are more important than the unit you're trying to kill 20130427 03:19:54< mattsc> And how do you put that into an equation? 20130427 03:20:56< skyfaller> ok, Fred doesn't attack because there is a lot of damage that can reach his units next turn, right? 20130427 03:21:18< mattsc> right (let me know if you want me to describe exactly what's going on) 20130427 03:22:45< skyfaller> so first, if there isn't enough damage to kill a unit in one round, attack with it with no hesitation 20130427 03:23:53< skyfaller> (we're talking about a situation where we're attacking a unit that any of our units can kill with one strike) 20130427 03:25:08< mattsc> I'd argue that point already... 20130427 03:25:37< mattsc> That's the typical bait-the-AI situation that works so well with the RCA AI (although it does it not just for kills) 20130427 03:26:09< mattsc> But ok, let's assume that. 20130427 03:26:34< skyfaller> well, if it is literally impossible for a unit to die next turn, and nothing can be trapped, then I stand behind my proposal 20130427 03:26:53< skyfaller> you can retreat your injured units and shield them with healthy units 20130427 03:26:54< mattsc> oh, maybe I misread what you wrote... 20130427 03:27:14< mattsc> You mean, if the _enemy_ cannot kill any of _my_ units? 20130427 03:27:23< skyfaller> yes. 20130427 03:27:28< mattsc> Right, yes, agreed and that is the case already. 20130427 03:28:07< skyfaller> add up the retal and counterattack possible damage and if nothing can die this turn (can we calculate the possibility of the enemy trapping us?) then go for the attack 20130427 03:28:10< mattsc> That's what the counter attack calculation works very well for. 20130427 03:28:36< mattsc> If you leave out the trapping, this is already done. 20130427 03:28:50< skyfaller> ok, trapping is really key but I'll assume we're working on it 20130427 03:29:02< skyfaller> if a punishment party is on the way, being trapped is basically the same as being dead 20130427 03:29:05< mattsc> Well, let's ignore the trapping for now (but I won't forget about it) 20130427 03:29:21< mattsc> ..un less you can kill one of the trappers first :) 20130427 03:29:51< skyfaller> so if there is enough damage on the way that retal + counterattack *might* kill your attacking unit, then you have to start calculating what you're willing to lose 20130427 03:30:18< mattsc> how do I do that? 20130427 03:30:30< skyfaller> calculate the unit's CTD vs. the CTK on the enemy unit 20130427 03:30:49< mattsc> sorry, I meanL 20130427 03:30:59< skyfaller> multiply your unit's CTD by its gold... and somehow we have to include XP in the calculation 20130427 03:31:05< mattsc> I am already calculating the retal and counter attack damage. How do I use that information 20130427 03:31:40< skyfaller> maybe figure how much gold the next lvl of your unit is, and use the percentage of XP it has towards the next level to add that much gold to its value? 20130427 03:31:52< skyfaller> does that make sense? 20130427 03:32:12< mattsc> Yes, that part's not a problem (and already done in parts of the code) 20130427 03:32:35< skyfaller> OK, so you multiply your CTD by your value, and the CTK on the enemy by its value 20130427 03:33:47< skyfaller> and if the enemy value is higher than your value, attack 20130427 03:33:51< skyfaller> does that make sense? 20130427 03:34:13< mattsc> Yes - and that's what I have. And it doesn't work... 20130427 03:34:30< skyfaller> why not? is the enemy's value not higher than your unit's value here? 20130427 03:34:57< skyfaller> there's no way that the units in range are more valuable than the mage 20130427 03:35:30< skyfaller> if that's the result, then there's something wrong with the valuableness calculation 20130427 03:36:07< mattsc> Well, actually, I don't have CTD for the counter attack, but that's again a technical detail, let's assume I do. 20130427 03:36:30< skyfaller> well, if you're including ctk you should include ctd I think 20130427 03:36:49< skyfaller> otherwise you're over-valuing your own unit 20130427 03:36:56< mattsc> It's because essentially you are restricted to calculate the attack of one of your units on the enemy, but the counter attack of all of the enemy units onto each of your units. 20130427 03:37:22< mattsc> (then write me a fast C++ routine that calculates that ;) ) 20130427 03:37:24< skyfaller> how much MP does the mage on the castle have? 20130427 03:38:01< mattsc> Doesn't matter, I don't need a solution that works for this specific situation, I need one that works whether that mage is fast or not. 20130427 03:38:09< mattsc> s/fast/quick 20130427 03:38:23< skyfaller> wait a minute 20130427 03:38:38< skyfaller> I thought you just told me that Fred isn't attacking because there is too much enemy damage on the way 20130427 03:38:43< mattsc> See, when I calculate the counter attack, I don't know which of the enemies will attack which of my units. 20130427 03:38:46< skyfaller> how do you know that if you're not calculating CTD? 20130427 03:39:02< mattsc> I go by an approximation of average damage. 20130427 03:39:29< mattsc> That's why I am saying, let's assume the techincalities of whether I actually have the information or not. 20130427 03:39:53< mattsc> Let's assume I do have it and come up with a theoretical solution for that. I'll worry about how to do that in practice then. 20130427 03:39:57< skyfaller> ok 20130427 03:40:07< mattsc> I'm just making a flippant side comment :) 20130427 03:40:28< skyfaller> but I've proposed a solution and you've rejected it saying that it doesn't work, except what you have isn't my solution 20130427 03:40:44< mattsc> See, you and I look at that and see that the unit that first attacks the mage likely never has to face any of the other enemies. 20130427 03:41:05< mattsc> No, I am saying that it doesn't work on principle grounds. 20130427 03:41:15< mattsc> At least not that easily. 20130427 03:41:21< skyfaller> hm... hold on 20130427 03:41:36< skyfaller> so let's say there are enough mages in range that my troll has a 100% CTD 20130427 03:41:51< mattsc> yes. 20130427 03:42:06< skyfaller> let's assume it has 0 XP, so it is worth exactly 13 gold 20130427 03:42:12< mattsc> (and a high CTD for the other units as well, which is the important bit here) 20130427 03:42:21< skyfaller> I don't care about the other units yet 20130427 03:42:31< skyfaller> I just want to decide what I'm going to do with this troll 20130427 03:43:03< skyfaller> if I can decide to attack even if this troll is certain to die and has 0 support from other units, then that's good 20130427 03:43:26< skyfaller> oh, I see 20130427 03:43:38< skyfaller> what's the CTK by the troll on the mage? 20130427 03:43:40< mattsc> Sure (I already have a follow-up question, but go on) 20130427 03:43:58< skyfaller> 2 strikes on 60% defense... 20130427 03:44:04< skyfaller> is that a 50% ctk? 20130427 03:44:06< mattsc> Right, so 84% 20130427 03:44:19< mattsc> 0.4 * 0.4 = chance to survie 20130427 03:44:29< skyfaller> oh, cool 20130427 03:44:51< skyfaller> ok, so .84*20=16.8 20130427 03:45:07< skyfaller> the troll should attack the mage even if it is certain the troll will die next turn 20130427 03:45:33< mattsc> Let me know when there's a good time to interject a question. 20130427 03:45:54< skyfaller> if the troll kills the mage, maybe at that point you should retreat your other units out of range and set up to kill or trap whatever kills your troll 20130427 03:46:07< skyfaller> ok, go ahead 20130427 03:46:24< skyfaller> 13<16.8 therefore attack 20130427 03:47:06< mattsc> Let's assume all Side 1 units are assassins and all 4 enemy units are close enough to get to any of the attack hexes on the poisoned mage. 20130427 03:47:23< mattsc> Otherwise the same situation. 20130427 03:47:41< mattsc> CTK on the mage is still 84%. 20130427 03:48:07< skyfaller> what? it should be better than that 20130427 03:48:08< mattsc> The combination of any of all 4 enemy units on any of my units gives me roughly a 100% chance to die. 20130427 03:48:15< skyfaller> 3 strikes with marksman 20130427 03:48:25< mattsc> Oh, sorry, bad example... 20130427 03:49:11< mattsc> Let's just assume they are something (roughly) equally valid units with 2 strikes... 20130427 03:49:26< mattsc> equally valid to the mage 20130427 03:49:50< mattsc> (hypothetical example; I am sure I can come up with a real situation, but I am too lazy for that). 20130427 03:50:16< skyfaller> well, if your unit is equally valuable to the mage, after calculating CTK and CTD, then maybe you shouldn't attack, flip a coin 20130427 03:50:17< mattsc> I'd likely still attack that mage, and then either set up a defensive line in those hills, or try to get rid of the other mage. 20130427 03:50:25< skyfaller> wait 20130427 03:50:42< skyfaller> if the CTK on the mage is above a certain number, I would remove it from counterattack calculations 20130427 03:51:11< mattsc> I have thought of that (or multiply by (1-CTK) or something... 20130427 03:51:16< skyfaller> assume you're going to kill it and only calculate retal 20130427 03:51:28< skyfaller> based on the assumption that you kill it with your last strike 20130427 03:52:01< mattsc> Ok, let me make up a completely different hypothetical situation. 20130427 03:52:20< skyfaller> I think if you run the numbers, an assassin that is 100% likely to die should still be worth less than a mage in that situation 20130427 03:52:23< mattsc> (I'm not getting the point across I am trying to make) 20130427 03:52:49< skyfaller> I'm not sure you should always attack the mage if you're going to lose units that are worth as much or more than the mage 20130427 03:53:21< mattsc> Can I try to set up a different situation? 20130427 03:53:55< mattsc> Let's assume I have 10 grunts, and the enemy has 5 grunts, all of which can reach each other. 20130427 03:54:00< vultraz> why not just say, kill the mage because he's weak and he can possibly inflict more damage if he's left alive 20130427 03:54:21 * vultraz hasn't read anything, just randomly put in his opinion 20130427 03:54:42< skyfaller> vultraz: forget the mage, mattsc is setting up a new example :) 20130427 03:55:20< mattsc> So, 5 grunts against 10 grunts, all on flat terrain, one of the grunts is sitting slightly in front of the rest. 20130427 03:55:30< mattsc> ... and is badly injured. 20130427 03:55:37< vultraz> do not kill 20130427 03:55:40< vultraz> duh 20130427 03:55:56< skyfaller> um 20130427 03:56:05< skyfaller> you have 10 grunts and the enemy has 5 grunts 20130427 03:56:18< vultraz> oh, I thought you were the guy with 5 20130427 03:56:22< mattsc> Fred, in that case, will not attack the injured grunt. 20130427 03:56:32< vultraz> kill, obviously 20130427 03:56:40< skyfaller> unless there's something really ominous coming as reinforcements, of course you attack the injured grunt 20130427 03:56:57< mattsc> The reason being that while the CTK on the enemy is ~100%, the CTD for any individual unit is also 100%. 20130427 03:57:17< mattsc> (let's assume those are the only units on the map, except for leaders) 20130427 03:57:38< skyfaller> I guess as orcs we should be willing to trade units of equal value, orcs like trading away cheap units 20130427 03:57:45< skyfaller> as an elf I would be less eager to trade units 20130427 03:58:08< skyfaller> if we can kill a 12 value unit with a 12 value unit, do it 20130427 03:58:30< mattsc> Right, but now make the enemy units slightly less valuable than yours. 20130427 03:58:59< skyfaller> I guess then what you really need to do is figure out what happens if you keep on trading units 20130427 03:59:03< mattsc> ... and this is just chosen as a ridiculously obvious example. The problem is that it has to work in all situation. 20130427 03:59:06< mattsc> s. 20130427 03:59:14< skyfaller> since you have more units here, you'll come out ahead if the trades continue 20130427 03:59:32< mattsc> But I still don't want to sacrifice units needlessly. 20130427 03:59:46< skyfaller> orcs are cheap, they want to die for the horde 20130427 03:59:49< mattsc> The problem is that by doing it this way is that the counter attack damage is hopelessly overrated. 20130427 03:59:58< mattsc> It has to work for any faction. 20130427 04:00:08< skyfaller> not yet it doesn't 20130427 04:00:17< mattsc> yes, it does. 20130427 04:00:23< skyfaller> the whole point of making Fred separate from Ron is to make Fred play perfectly within his limits 20130427 04:00:31< skyfaller> then figure out how to generalize them 20130427 04:00:32< mattsc> Nope. 20130427 04:00:56< mattsc> I've changed that. 20130427 04:01:05< mattsc> There is no way I will have the time to do that. 20130427 04:01:24< mattsc> I need something that works reasonably well in general. 20130427 04:01:32< mattsc> But again, that's besides the point. 20130427 04:01:55< skyfaller> well, I disagree with that approach, but it's your baby 20130427 04:02:00< vultraz> what happens if you have 5 walking corpses against 2 1HP ancient liches 20130427 04:02:18< vultraz> does fred attack? 20130427 04:02:24< skyfaller> the thing is that the ideal playstyle does depend on faction 20130427 04:02:48< skyfaller> I would weight sacrifice plays different for orcs than elves 20130427 04:03:04< skyfaller> it's not just the unit 20130427 04:03:08< skyfaller> it's the way the whole faction plays 20130427 04:03:18< mattsc> Ok, let's for the sake of argument assume that we only do this for orcs. 20130427 04:03:33< mattsc> I still don't see a way to code this. 20130427 04:03:59< skyfaller> yeah, it looks tricky 20130427 04:04:19< skyfaller> I think what I've proposed will take us part way there, but figuring out what happens at the end of the trades is hard for an AI 20130427 04:04:53< skyfaller> the AI has to realize that when 10 starts trading with 5, soon you will have units and the enemy won't have any on that front 20130427 04:04:57< mattsc> I don't even see how I can calculate the trades correctly. 20130427 04:05:26< skyfaller> well, you would *have* to estimate 20130427 04:05:44< mattsc> But that last argument doesn't work any more when you start taking terrain and unit positioning into account, which is what I am trying to do here. 20130427 04:05:56< mattsc> We're way past the tit for tat stage. 20130427 04:06:09< mattsc> (hope I used that phrase correctly) 20130427 04:06:27< skyfaller> ok, so what you really want is to take into account that you can create defensive formations and not take the full damage of the enemy force? 20130427 04:07:08< mattsc> yes - but I cannot calculate the series of all attacks on the different enemies. 20130427 04:07:39< mattsc> I have to do one enemy at a time (although I can do several of my units on each enemy) 20130427 04:08:07< mattsc> Anyways, skyfaller, TBH, I am very close to stop working on Fred altogether. 20130427 04:08:59< skyfaller> are you frustrated/stuck on how to make him better? or just out of time? 20130427 04:09:16< mattsc> I've been trying for, what, a year now? And I don't feel that the current version is much better than, maybe not the first, but roughly the third version we had. 20130427 04:09:57< mattsc> It's not going anywhere. Everything I try makes some situations a bit better, but it makes just as many by an equal amount worse. 20130427 04:10:03< skyfaller> it seems to me that you told me you did a massive redesign to make him more flexible and able to improve in the future 20130427 04:10:16< skyfaller> and we stopped working on improvements in gameplay for a while 20130427 04:10:21< mattsc> Yes, I did. And it doesn't seem to improve anything. 20130427 04:10:40< skyfaller> well, we haven't spent much time really drilling down on Fred's gameplay since the redesign 20130427 04:11:10< mattsc> It's not the gameplay, it's the simple mechanics of rating functions for situations like this. 20130427 04:11:31< mattsc> As I said, I can easily make Fred deal correctly with this situation, no problem whatsoever. 20130427 04:11:36< skyfaller> we should set up some tests, e.g. automated runs against the AI and test situations like I proposed in the past, and just keep tuning and iterating the design until Fred does better consistently 20130427 04:11:38< vultraz> [13:01:38] vultraz what happens if you have 5 walking corpses against 2 1HP ancient liches 20130427 04:11:40< vultraz> [13:01:56] vultraz does fred attack? 20130427 04:11:56< mattsc> And as a result he will do much worse than he currently does in some others. 20130427 04:12:21< skyfaller> mattsc: that's why you have a bunch of test situations, so that you can keep tweaking until he does well in ALL of them 20130427 04:12:24< mattsc> skyfaller: that is exactly what I am doing. Just that they are my own test cases. 20130427 04:12:44< mattsc> skyfaller: but it doesn't. That's the problem I am facing. 20130427 04:12:54< mattsc> I make it deal with one test case, and it screws up another. 20130427 04:13:13< mattsc> And I simply do not know how to make it deal with all test cases well. 20130427 04:14:03< skyfaller> this particular problem seems like a hard problem but not an insoluble problem 20130427 04:14:27< skyfaller> I'm not sure how to give you a pep talk here, but Fred and Ron are way better than any other AI in the game, last I checked 20130427 04:14:48< skyfaller> if Fred is better than Ron, then despite all his flaws, he's the best AI in Wesnoth, no? 20130427 04:15:13< skyfaller> if Fred is hard to improve at this point, it's because we've already done a good job 20130427 04:15:49< mattsc> skyfaller: I agree that they are better. But I don't think Fred is significantly better than Fred was 6 months ago. 20130427 04:16:01< skyfaller> it seems silly to quit there... we've made the easy improvements, we have to expect that hard improvements will be harder 20130427 04:16:20< skyfaller> if it was easy, the RCA AI would have already been smarter 20130427 04:16:49< skyfaller> well, we stopped for a rewrite, it's like Mozilla -> Firefox 20130427 04:16:56< mattsc> skyfaller: agreed - but I might have to face the reality that this is about how far I can take it. (both for time and lack of experience or brains reasons) 20130427 04:17:13< skyfaller> Mozilla was an advanced browser, but it couldn't progress any further in its current condition 20130427 04:17:22< skyfaller> they stopped and rewrote it as Firefox 20130427 04:17:32< skyfaller> in its early days Firefox sucked worse than Mozilla 20130427 04:17:52< skyfaller> but because of the redesign it had the potential to be better than Mozilla 20130427 04:18:03< skyfaller> and now everyone uses Firefox and nobody uses Mozilla 20130427 04:18:08< mattsc> Well, and that's what I was trying to do with Fred. 20130427 04:18:27< skyfaller> my point is that you should just give it a little time, there's a worldchanging Firefox inside of Fred 20130427 04:18:38< skyfaller> or at least Wesnoth-changing 20130427 04:18:45-!- Blueblaze [~Blueblaze@adsl-76-202-16-62.dsl.hstntx.sbcglobal.net] has joined #wesnoth-umc-dev 20130427 04:18:45< skyfaller> Wesnoth being somewhat smaller than the world 20130427 04:18:52< mattsc> :) 20130427 04:19:24< mattsc> Btw, vultraz, I don't know if he would. 20130427 04:19:40< mattsc> Anyways, I am out of time for today ... 20130427 04:19:51< skyfaller> OK, I hope I was helpful somehow.... 20130427 04:20:15< mattsc> skyfaller: yes, thanks, it is always helpful. 20130427 04:20:21< skyfaller> but don't give up now, you've done really well, and it's silly to compare Fred to Fred 6 months ago when most of that time was spent rewriting and not improving performance 20130427 04:20:51< mattsc> But I still have no idea how to continue from here - which doesn't mean I won't keep trying. 20130427 04:21:48< mattsc> I'm just not convinced that I'll ever get to the goal I have set for myself - which is much less lofty than the one you're going for, I think. :) 20130427 04:21:50< vultraz> take a look at how other similar games do their ais? 20130427 04:22:14< vultraz> do a comparison based on similar testcases in both games? 20130427 04:22:17< skyfaller> I would like to make sure that the "simple" calculation I proposed is being correctly carried out, and have Fred attack when units are of equal value 20130427 04:22:21< mattsc> vultraz: not me. I just don't have the time. 20130427 04:22:41< skyfaller> I know that doesn't cover the 10 grunts vs. 5 grunts problem, but it would improve Fred's gameplay in many situations 20130427 04:22:44< vultraz> figure out what the second game does for their ai that makes it work? 20130427 04:22:49< vultraz> emulate that in fred? 20130427 04:22:58< skyfaller> and we can figure out how to make Fred more aggressive later 20130427 04:23:21< mattsc> vultraz: yes 20130427 04:23:43< skyfaller> once we fix this injured mage problem, let's ask in the forums about the 10 grunts vs. 5 grunts problem, and maybe Rigor or someone smarter than me will have an answer 20130427 04:23:50< skyfaller> if you and I haven't come up with one by then 20130427 04:24:06< mattsc> skyfaller: again, it's not the making him more aggressive as a whole, it's keeping him from doing really stupid crap in most (not even talking about all) situation. 20130427 04:24:36< skyfaller> well, I think what I proposed should prevent him from ignoring obvious targets, it may just not be good enough to attack some less obvious targets 20130427 04:25:06< skyfaller> I can't see how it would make him attack targets that he shouldn't 20130427 04:26:26< skyfaller> and I'd really like to have a public series of tests that anyone can run to see if Fred has regressed, to make it easier for other people to contribute to this project... it would even help other people writing Wesnoth AIs, they could use our tests too 20130427 04:27:15< skyfaller> if you're the only person with access to the tests then you're making yourself indispensable, and that's silly if you feel like you're running out of time for Fred 20130427 04:28:34< skyfaller> people could run the tests before they submit a patch, we could run the tests before each release to make sure that each release of Fred is strictly better 20130427 04:29:27< skyfaller> I dunno, I'm no development expert, but you say you feel like every change you make makes some things better and some things worse, well, let's get specific about measuring that 20130427 04:29:50< _8680_> mattsc, skyfaller: Have you looked into Travis CI? [https://github.com/travis-ci/travis-ci#readme] 20130427 04:30:29< _8680_> It’s a continuous integration system available to GitHub projects. 20130427 04:30:55< skyfaller> I have not, and I'll admit total ignorance as to how we could use that to test our AI 20130427 04:31:10< skyfaller> usually the problem isn't that the code won't run, it's that the AI plays badly 20130427 04:31:14< _8680_> Whenever someone pushes, it runs all your tests. 20130427 04:31:27< _8680_> So once you have tests, you can automate their running. 20130427 04:31:36< skyfaller> hm.................. 20130427 04:32:26< skyfaller> that sounds very interesting, if we can really trigger various Wesnoth scenarios from the command line.... where are the tests run? 20130427 04:33:13< _8680_> In distributed virtual machines. 20130427 04:33:36< _8680_> However, I’m not sure it supports Lua. 20130427 04:34:05< skyfaller> well, what we really need is something that can run Wesnoth well enough to actually play games 20130427 04:34:22< _8680_> I should have checked that it supports Lua before suggesting it, mea culpa. 20130427 04:34:25< skyfaller> I'm not sure anything less than that will be able to test the AI's gameplay 20130427 04:34:37< _8680_> Yes, never mind. 20130427 04:34:47< _8680_> This has all been a great waste of your time. 20130427 04:34:53< skyfaller> hahaha, no worries 20130427 04:35:05< skyfaller> something like that would be perfect if it could run Wesnoth scenarios from the command line 20130427 04:35:37< _8680_> No, I should be worried; I should be more careful. 20130427 04:35:51< skyfaller> ... I guess we would have to measure what happens inside Wesnoth from the command line, e.g. did the 10 grunts attack the 5 grunts or not? 20130427 04:36:39< skyfaller> I'm not sure if normal Wesnoth output could tell you that, you might have to throw messages to the command line? 20130427 04:36:57< skyfaller> it wouldn't be so bad if we could write a bash script that automates that 20130427 04:37:07< _8680_> I don’t see any problems with that. 20130427 04:37:24< _8680_> But you would need Wesnoth to run your tests. 20130427 04:37:52< _8680_> You could include a Wesnoth executable in your repository, but I expect GitHub would frown upon that. 20130427 04:38:18< skyfaller> well, what if I install Wesnoth on my Linode virtual server 20130427 04:38:46< skyfaller> and every time someone makes a commit my server syncs and then runs the bash script 20130427 04:38:52< _8680_> If you have a server, then you don’t need Travis — you can just run your own CI. 20130427 04:39:04< skyfaller> ok, here's where I admit I don't know how to run a CI at all :) 20130427 04:39:11< _8680_> Neither do I. 20130427 04:39:25< _8680_> But I’m sure either of us could learn. 20130427 04:39:34< skyfaller> would you be interested in helping me? 20130427 04:39:52< _8680_> As in I learn first, then teach you? 20130427 04:39:55< skyfaller> hahahaha 20130427 04:40:00< skyfaller> that would be ideal 20130427 04:40:12< _8680_> I don’t have a server though. 20130427 04:40:31< skyfaller> ... I could give you some sort of access to mine? 20130427 04:40:38< skyfaller> I'm not sure what the secure way to do that is 20130427 04:40:41< skyfaller> but I have root 20130427 04:40:56< _8680_> SSH? 20130427 04:40:57< skyfaller> if you screw up my machine I could just restore from a backup 20130427 04:41:09< _8680_> Or, I do have a desktop I could use as a server, with some work. 20130427 04:41:30< skyfaller> it might be easier to use your desktop, I don't think I have a gui installed on my server 20130427 04:41:41< skyfaller> it's just a webserver right now 20130427 04:41:43< _8680_> I don’t need a GUI. 20130427 04:41:57< _8680_> I could use virtual machines, to prevent damage. 20130427 04:42:00< skyfaller> oh, right, I guess Wesnoth can run headless 20130427 04:43:00< skyfaller> well, I'd be happy to give you access to my server if we can make sure not to disturb the websites it is serving 20130427 04:43:30< _8680_> I think I can do that. 20130427 04:43:38< _8680_> Or not do that, as the case may be. 20130427 04:43:44< skyfaller> ok :) 20130427 04:44:20< skyfaller> well, it's late here and I don't feel like using my brain right now, but maybe we could set aside some time this coming week to take a crack at this? 20130427 04:44:25< _8680_> So, to summarize, you’re having me set up a CI system for you? 20130427 04:44:41< skyfaller> Yes, and I'm happy to help in any way I can but I'm a total noob 20130427 04:45:36< skyfaller> we may need mattsc's help for figuring out how to set up the test scenarios and detect their results from the command line 20130427 04:46:09< _8680_> What Linux distribution is your server running? 20130427 04:46:24< skyfaller> Ubuntu... 20130427 04:46:27< _8680_> Okay. 20130427 04:46:41< skyfaller> Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.8.4-linode50 i686) 20130427 04:47:14< _8680_> Somewhat old, but I’ll manage. 20130427 04:47:34< skyfaller> I could probably update it to a newer Ubuntu if you want 20130427 04:47:48< skyfaller> it was serving my websites fine so I left it alone :P 20130427 04:48:17< _8680_> If you’re using a LTS release for a server, stay with it until the next LTS. 20130427 04:48:45< _8680_> Which is 13.10, I think. 20130427 04:49:09< skyfaller> sounds reasonable to me, that's what I intend on doing unless I need a package or something that isn't available for my Ubuntu version 20130427 04:50:57< _8680_> I assume we’d be using trunk(?) Wesnoth? 20130427 04:51:46< mattsc> skyfaller: you cannot start a savefile in nogui mode 20130427 04:52:00< skyfaller> really? well, that sucks 20130427 04:52:35< skyfaller> _8680_: we'd probably use the latest development version, 1.11.2, not whatever the latest git commit is 20130427 04:52:57< skyfaller> why the hell can't you start a savefile, if you can play a game? 20130427 04:54:17< mattsc> you can start a savefile from the commandline. You cannot in nogui mode. 20130427 04:54:38< skyfaller> but you can play a game in nogui mode, correct? isn't that how we ran all those RCA vs. Fred tests? 20130427 04:55:18< mattsc> You can *start* a MP game with all sides in AI mode from the commandline. 20130427 04:55:47< _8680_> We’ll still need to compile from Git — the latest development version out for Ubuntu is 1.11.1, and it doesn’t work. 20130427 04:56:22< skyfaller> oh, ok, I guess we'll just have to compile the tagged version then 20130427 04:56:45< skyfaller> mattsc: then why on earth can't you load a savefile? Is there a reason or is it just something they haven't gotten around to enabling? 20130427 04:57:25< mattsc> I don't know. 20130427 04:57:34< skyfaller> ok, who should I ask? :) 20130427 04:58:50< mattsc> I don't know either. Crab_? 20130427 04:59:08< skyfaller> ok, I guess I'll start with him 20130427 04:59:29< skyfaller> _8680_: in the meantime, it sounds like we'll have to figure out how to run Wesnoth with a gui 20130427 04:59:56< _8680_> That would be… difficult. 20130427 05:00:11< _8680_> Possible, but I don’t feel up to it. 20130427 05:00:54< skyfaller> well, we could start by automating several hundred games against the RCA AI in nogui mode, just so we can see if Fred starts playing badly against the RCA AI all of a sudden 20130427 05:01:11< skyfaller> but that's not really a test case 20130427 05:01:48< skyfaller> it doesn't matter if you can't see the gui so long as we can still receive information on what is happening in the game... 20130427 05:01:53< skyfaller> and measure it 20130427 05:03:11< _8680_> But I expect trying to start Wesnoth with a GUI without any GUI would cause errors. 20130427 05:03:36< skyfaller> well, if there is a gui but you're accessing a server from SSH, there is a GUI but you don't see it, right? 20130427 05:03:54< skyfaller> I can install the stuff on my server necessary to run a gui if that's... necessary. I'd just prefer not to. 20130427 05:05:27< skyfaller> maybe we could get it running on your computer and then transfer it to my server once we have it running? I dunno 20130427 05:05:31< _8680_> If I’m running a GUI application over SSH, and don’t allow it to open its GUI on my computer, it will die. 20130427 05:06:07< _8680_> I don’t know about running a GUI application from an automated process that can’t use a GUI. 20130427 05:06:27< skyfaller> hm... 20130427 05:06:45< skyfaller> the more I try to do with computers, the less intelligent I feel :( 20130427 05:08:49< _8680_> I advise seeing if you can get some developer(s) to implement loading a save without a GUI. 20130427 05:08:58< skyfaller> yeah, I'll definitely try that 20130427 05:09:46< skyfaller> Crab doesn't appear to be around right now 20130427 05:09:59< skyfaller> but I'll ask him first the next time I see him 20130427 05:12:17< mattsc> skyfaller: there's the completely separate question how you want to figure out in nogui mode whether Fred correctly solved your test case. 20130427 05:12:27< skyfaller> yeah, that is a problem :( 20130427 05:12:28< mattsc> I'd try to solve that first, before I put any effort into this 20130427 05:13:04< mattsc> I can output any information you want in text format, but what do you do with it? 20130427 05:13:30< skyfaller> well, some test cases should be easy 20130427 05:13:34< skyfaller> for instance, testing for attacking that mage 20130427 05:13:44< skyfaller> you should be able to throw us some text if Fred attacks the mage 20130427 05:14:20< skyfaller> to make the test easy, we just fail the test if there is no attack and pass if any of Fred's units attack 20130427 05:14:39< skyfaller> same thing for the 10 grunts vs. 5 grunts, actually 20130427 05:15:11-!- ancestral [~ancestral@mobile-198-228-234-174.mycingular.net] has joined #wesnoth-umc-dev 20130427 05:15:16< skyfaller> I know one problem we had in the past we want to test for is if Fred puts units on crucial villages 20130427 05:16:00< skyfaller> so throw us a message when a unit is standing on a village and what its coordinates are? 20130427 05:16:16< skyfaller> and fail the test if no unit is standing on the village we want occupied? 20130427 05:16:39< skyfaller> I'm sure some tests will be harder, but we can just start with easier ones 20130427 05:16:39< mattsc> I can give you the messages for all attacks, moves and recruits. 20130427 05:16:53< mattsc> You need to figure out a system to interpret those. 20130427 05:17:08< skyfaller> hm... I guess for that test, if we start out with a unit on the village, we can fail if it moves away 20130427 05:17:20< skyfaller> and if we start with no unit occupying the village, we can fail if nothing moves there 20130427 05:17:57< skyfaller> what we really want for tests is a situation where there are only a few easily testable correct answers 20130427 05:18:35< skyfaller> this shouldn't be that hard, b/c our first priority with Fred is to stop him from making obviously stupid mistakes :) 20130427 05:37:58< mattsc> ... 20130427 05:39:49< mattsc> I'm going to turn the computer off (figuratively speaking) though. I don't know when I'll pick this back up. 20130427 05:42:22< skyfaller> aw, well, if there's anything I can do to help let me know 20130427 05:42:37< skyfaller> I'll do what I can to set up this testing system as discussed 20130427 05:44:42< mattsc> nothing I can think of - unless you actually want start coding 20130427 05:45:24< mattsc> I seriously do not know how to continue from here on (implementing some special cases is fine, but won't solve the underlying problem) 20130427 05:45:47< mattsc> I'm hoping that letting it settle for a while will give me some ideas. 20130427 05:45:53< mattsc> Bye for now. 20130427 06:03:07-!- mattsc [~mattsc@d154-20-34-165.bchsia.telus.net] has quit [Quit: bye] 20130427 06:08:58-!- ancestral [~ancestral@mobile-198-228-234-174.mycingular.net] has quit [Quit: Smell ya later!] 20130427 06:13:14-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev --- Log opened Sat Apr 27 06:42:50 2013 20130427 06:42:58-!- lobby [~wesnoth@wesnoth/bot/lobby] has joined #wesnoth-umc-dev 20130427 06:42:58-!- Topic for #wesnoth-umc-dev: Repository upgrade completed -- details here: http://is.gd/1yM603 | Wesnoth-UMC-Dev Project discussion and support channel | http://wesnoth-umc-dev.ai0867.net | Staff: AI0867, Espreon | Blog: http://wesnoth-umc-dev.ai0867.net/blog/ | IRC logs: http://irclogs.wesnoth.org, http://irclogs.ai0867.net 20130427 06:42:58-!- Topic set by shadowm [~ignacio@wesnoth/developer/shadowmaster] [Sun Apr 21 04:50:23 2013] 20130427 06:42:58[Users #wesnoth-umc-dev] 20130427 06:42:58[@ChanServ ] [ ancestral] [ happygrue ] [ melinath ] [ wesbot] 20130427 06:42:58[+shikadibot] [ Blueblaze] [ iwaim ] [ shadowm ] 20130427 06:42:58[ _8680_ ] [ Espreon ] [ lobby ] [ skyfaller] 20130427 06:42:58[ AI0867 ] [ fabi_ ] [ loonycyborg] [ vultraz ] 20130427 06:42:58-!- Irssi: #wesnoth-umc-dev: Total of 17 nicks [1 ops, 0 halfops, 1 voices, 15 normal] 20130427 06:42:59-!- Home page for #wesnoth-umc-dev: http://wesnoth-umc-dev.ai0867.net 20130427 06:43:15-!- Channel #wesnoth-umc-dev created Mon Mar 31 16:51:24 2008 20130427 06:44:47-!- Irssi: Join to #wesnoth-umc-dev was synced in 116 secs 20130427 07:40:00-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130427 08:50:56-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20130427 09:14:22-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [] 20130427 09:18:02-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20130427 09:29:35-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has quit [Remote host closed the connection] 20130427 11:11:26-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130427 11:58:02-!- Blueblaze [~Blueblaze@adsl-76-202-16-62.dsl.hstntx.sbcglobal.net] has quit [Quit: Blueblaze] 20130427 12:20:02-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 245 seconds] 20130427 12:54:07-!- loonybot [~loonybot@wesnoth/bot/loonybot] has joined #wesnoth-umc-dev 20130427 12:54:10-!- mode/#wesnoth-umc-dev [+v loonybot] by ChanServ 20130427 12:57:45-!- irker517 [~irker@ai0867.net] has joined #wesnoth-umc-dev 20130427 12:57:45< irker517> NX-RPG: Charles Dang :master * ddc1ace / macros/storytxt-global.cfg: https://github.com/Vultraz/NX-RPG/commit/ddc1ace76139b32972db96c4a173cdddc7832179 20130427 12:57:46< irker517> NX-RPG: Fixed unterminated quoted string 20130427 12:58:34< vultraz> bumbadadabum: ^ 20130427 12:59:08< vultraz> and woah, what happened to the short links 20130427 13:13:04< bumbadadabum> vultraz: duel? 20130427 13:14:06< bumbadadabum> wrong channel but bleh 20130427 13:17:21< vultraz> niet 20130427 13:54:53< irker517> AI-Demos: Zazweda master * r70bd1c3 / micro_ais/ais/mai_guardian_engine.lua : cosmetic changes - http://git.io/I64lBg 20130427 15:25:49-!- skyfaller [~skyfaller@c-75-67-154-18.hsd1.ma.comcast.net] has joined #wesnoth-umc-dev 20130427 15:25:49-!- skyfaller [~skyfaller@c-75-67-154-18.hsd1.ma.comcast.net] has quit [Changing host] 20130427 15:25:50-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has joined #wesnoth-umc-dev 20130427 16:07:47-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20130427 16:25:58-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Read error: Connection reset by peer] 20130427 16:26:58-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-umc-dev 20130427 16:29:59-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130427 16:33:38-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130427 16:49:54-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 264 seconds] 20130427 16:54:55-!- irker517 [~irker@ai0867.net] has quit [Quit: transmission timeout] 20130427 17:30:15-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has quit [Remote host closed the connection] 20130427 18:14:05-!- mattsc [~mattsc@d154-20-34-165.bchsia.telus.net] has joined #wesnoth-umc-dev 20130427 18:21:59-!- Blueblaze [~Blueblaze@adsl-76-202-16-62.dsl.hstntx.sbcglobal.net] has joined #wesnoth-umc-dev 20130427 18:31:52-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130427 18:42:28< AI0867> about the short links: git.io occasionally fails, in which case things fall back to long links 20130427 18:46:59-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130427 18:55:48-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130427 19:00:37-!- ancestral [~ancestral@67-6-53-117.mpls.qwest.net] has joined #wesnoth-umc-dev 20130427 19:09:59-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-umc-dev 20130427 20:49:55-!- Crendgrim [~quassel@g224213238.adsl.alicedsl.de] has joined #wesnoth-umc-dev 20130427 21:55:46-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-umc-dev 20130427 22:03:24-!- pydsigner [~Thunderbi@unaffiliated/pydsigner] has joined #wesnoth-umc-dev 20130427 22:40:14-!- mattsc [~mattsc@d154-20-34-165.bchsia.telus.net] has left #wesnoth-umc-dev [] 20130427 22:40:42-!- mattsc [~mattsc@d154-20-34-165.bchsia.telus.net] has joined #wesnoth-umc-dev 20130427 22:57:37-!- Blueblaze2 [~Blueblaze@76.202.18.250] has joined #wesnoth-umc-dev 20130427 23:00:14-!- Blueblaze [~Blueblaze@adsl-76-202-16-62.dsl.hstntx.sbcglobal.net] has quit [Ping timeout: 240 seconds] 20130427 23:00:14-!- Blueblaze2 is now known as Blueblaze 20130427 23:08:48-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has joined #wesnoth-umc-dev 20130427 23:14:18-!- pydsigner [~Thunderbi@unaffiliated/pydsigner] has quit [Ping timeout: 245 seconds] --- Log closed Sun Apr 28 00:00:03 2013