Herethios
19 posts
|
Hey Leftylink!
I started to remove some Compiler Warnings.. Thy hurt my eyes! ;) I don’t know my way around on github, so please check wheter I have done anything wrong or not! I have more changes wich I have not put on github yet, because after changing xml.cpp my pull request said 60 changes! I suppose that qould be into master and not into leftylink…
I am used to Clearcase! First Time I am trying to help on a github project!
Greets
Herethios
|
|
|
thror13
652 posts
|
Originally posted by catepillar:
I am thinking about building a GUI for this.
I am starting a poll to see what the preferred graphics library would be. I understand that I will be unable to please everyone, but I honestly have no preference in which I am using. Also note that more options are available, but if you don’t know what the ones I posted mean, then I suggest NOT answering this poll.
1. GTK+
2. Qt
3. WxWidgets
I have only done minimal amount of GUI development, and that was done in FTLK, which I would like to avoid if possible. If you have another suggestion, please make sure I can compile and utilize it with MinGW.
From what i gather after some search, if you have no previous experience with one of them, Qt should be the way to go….
|
|
|
catepillar
2023 posts
|
Originally posted by thror13:
Originally posted by catepillar:
I am thinking about building a GUI for this.
I am starting a poll to see what the preferred graphics library would be. I understand that I will be unable to please everyone, but I honestly have no preference in which I am using. Also note that more options are available, but if you don’t know what the ones I posted mean, then I suggest NOT answering this poll.
1. GTK+
2. Qt
3. WxWidgets
I have only done minimal amount of GUI development, and that was done in FTLK, which I would like to avoid if possible. If you have another suggestion, please make sure I can compile and utilize it with MinGW.
From what i gather after some search, if you have no previous experience with one of them, Qt should be the way to go….
Well after about 6 hours of a notepad open, I have a decent start. I expect to be done over the weekend. :)
|
|
|
Herethios
19 posts
|
I can compile without warnings now. Found one .. ehrm… Mistake:
In cards.cpp in line 49 is a comparison between unsigned and signed int.
“if(card→m_set > != -1)”
I suppose that should be something like “if(card→m_set > 0)” or m_set should be an int!
l8er
Herethios
Edit I updated my Patch 2 Branch. All Compiler Warnings should be removed.
|
|
|
leftylink
86 posts
|
Originally posted by Herethios:
I can compile without warnings now. Found one .. ehrm… Mistake:
In cards.cpp in line 49 is a comparison between unsigned and signed int.
“if(card→m_set > != -1)”
I suppose that should be something like “if(card→m_set > 0)” or m_set should be an int!
l8er
Herethios
Edit I updated my Patch 2 Branch. All Compiler Warnings should be removed.
Oooo I see a pull request. Still busy today, but took a look and things look good. I will give the pull request a proper treatment over the weekend, probably (twill be the first pull request I deal with on any repo I own). I may have to ask you to make it so that your patches don’t apply the whitespace changes they currently are applying…
After this I guess we can compile with -Werror.
Looks like Card::m_set should either take on a default value of 0 if no set, or be made an int.
|
|
|
Herethios
19 posts
|
I had a further look earlier on and cause the compiler cannot change the variable into a smaller type, it will have changed it into a long. (Next bigger chance) But i suppose an int will be big enough! Then the rest can stay as it is!
|
|
|
Herethios
19 posts
|
-Does anyone use Dev C++? I used VS2010 so far, but I am trying to get Dev C++ to work with this Project. Any hints or tips ? -
Stuff that.. testing QT Creator now!
Edit: and guess what! Working nicely! removed two more warnings. Could Actually start doing something usefull now. But: no more Time left..
|
|
|
Kassiopeia
37 posts
|
If it is manageable, do you think you could implement an extension to the use of cards of the ownedcards.txt so that the optimizer could use up to 10 copies of a reward card, although you only have 1 copy.
For example: You have 2 Splitjaws, but assume that there is a better deck against the enemy deck with 3 or more splitjaws. But you won’t see this deck, because the optimizer only counts your 2 copies.
In my opinion, since the introduction of the component selling feature gold is not a problem at all for most of the old players. They could easily buy extra copies of a reward card.
This extension should only work for cards from the reward tab of the cards.xml. Maybe you should exclude the tournament rewards, because the can’t be bought with gold. Reward cards gained from missions are mostly unique i think so no problem there. The bulk of the reward cards can be bought from the reward tab of the store.
I hope other players and you leftylink will think this is a good idea.
(P.S. i also posted this text in commonkey’s thread. I don’t know how you guys handle things with each other)
|
|
|
Kaeel
322 posts
|
I can create an interface in C# and .NET, if someone is interested.
|
|
|
leftylink
86 posts
|
Small announcements:
I added a small fix to the XML parsing code that will cause it to NOT choke on the ` character in raids.xml. Now, removing the ` character is completely optional!
I merged in all of Herethios’s compiler warning fixes and added the -Werror flag to the Makefile (causes compilation to FAIL if there are any warnings). There were no warnings on my development machines, but if you find any because of platform differences, feel free to point them out to me.
Yes, all branches are rebased.
Probably the next item on my list is “on Kill”, but I think I am waiting on more information on its mechanics before diving into the implementation.
Now to reply to a few posts:
Originally posted by KevinChan2:
In Automatic deck optimization:
tyrant_optimize.exe SzMBLeCIIGMBInEFJw “Xeno Domination 1” -o -s -r climb 100000 > result.txt
(omitted)
win%: 70.806 (70806 out of 100000)
In SimTyrant v1.105:
Wins 3170/5000 63.4%
Link: http://haileon.com/SimTyrantJS?deck1=SzMBLeCIIGMBInEFJw&surge=1&ordered=1&mission=318&sims=5000
I don’t know whether this is bug, so I post a report here.
I think this is a significant discrepancy, and that you should figure out a minimal set of cards (possibly a subset of cards used here) that cause this discrepancy, and we should talk.
Originally posted by commonkey:
Thunor: you can use card IDs instead of name. So for example in Custom.txt:
bla: Dracorex, pip [864], Orbo
is a valid deck. 864 is the id for pip, you can find all the IDs in cards.xml
Thank you commonkey. I am updating my first post to indicate this.
Psst, we should talk about merging my changes sometime…
Originally posted by Herethios:
Hey Leftylink!
I started to remove some Compiler Warnings.. Thy hurt my eyes! ;) I don’t know my way around on github, so please check wheter I have done anything wrong or not! I have more changes wich I have not put on github yet, because after changing xml.cpp my pull request said 60 changes! I suppose that qould be into master and not into leftylink…
I am used to Clearcase! First Time I am trying to help on a github project!
Greets
Herethios
Yeah, it’s because I rebased the branch since you cloned it. No matter, I’ve merged your changes in. Thanks for your help!
Originally posted by Kassiopeia:
If it is manageable, do you think you could implement an extension to the use of cards of the ownedcards.txt so that the optimizer could use up to 10 copies of a reward card, although you only have 1 copy.
You are right that this is useful. I’m not sure this is a job for tyrant_optimize to handle, though. More likely this job can be done by a small script that reads cards.xml and ownedcards.txt and output an ownedcards.txt with 10 copies of any gold-buyable reward card. Then you simply use that new ownedcards.txt instead. Because I feel like this functionality is better implemented externally, it is really low priority for me to implement right now, but I will consider it if someone writes it and submits a pull request.
Originally posted by Kaeel:
I can create an interface in C# and .NET, if someone is interested.
Oh, I’m sure someone is interested, as evidenced by conversations earlier in this thread. Anyone is free to contribute whatever they want; that is one of the good parts of open source. There are various options available for making this GUI, and it is made easy by the fact that the command-line options already complete control over all of this tool’s functionality. Of course, the previous point means that for me personally, a GUI would simply make this tool harder to use and use up unnecessary resources as well, a double whammy! I have no interest in providing a GUI or including it on my repo, but that still should not stop you from creating one if you feel like it.
|
|
|
grrrmpf
17 posts
|
Thanks Leftylink for all the work you put into this! Quick question since I am not a git expert: How do I deal with git error messages like this (caused in this case by the “-lboost_chrono” required on Windows)?
error: Your local changes to the following files would be overwritten by merge: Makefile
Simply moving that file out of the way does unfortunately not seem to help.
|
|
|
tibia_fry
29 posts
|
Hello I’m trying to find an optimized deck that uses my ownercards.txt cards against “Mission 65”.
I understand that the correct command for that would be:


img824.imageshack.us/img824/6310/errorgg.png
But I’m getting that Error. Any help? Thank you!
|
|
|
tibia_fry
29 posts
|
|
|
|
KevinChan2
206 posts
|
Hello I’m trying to find an optimized deck that uses my ownercards.txt cards against “Mission 65”.
Why not use the following command?
tyrant_optimize.exe PsID+q “Mission 65” -o climb 1000 > result.txt
(PsID+q means Lord of Tartarus + Microgen(10); You can substitude with any decks that you can spam.)
Although the initial winrate is low, it will be improved very quickly using the cards in ownedcards.txt
|
|
|
tibia_fry
29 posts
|
Originally posted by KevinChan2:
Hello I’m trying to find an optimized deck that uses my ownercards.txt cards against “Mission 65”.
Why not use the following command?
tyrant_optimize.exe PsID+q “Mission 65” -o climb 1000 > result.txt
(PsID+q means Lord of Tartarus + Microgen(10); You can substitude with any decks that you can spam.)
Although the initial winrate is low, it will be improved very quickly using the cards in ownedcards.txt
Thank you I have discovered that you need to use an initial deck. This program is AMAZING!!! Thanks for the help and respect to the author!
I’m still new to tyrant and I don’t understand one thing: what does “in order” applied to decks mean? I just tought you get random order while playing, don’t you?
|
|
|
Aapje
502 posts
|
You have a choice which cards to play of the 3 you get. ‘In order’ means that the sim tries to play the order as given. So if the ordered deck is Fortifier, Microgen, Sabre, Tiamat, etc and the initial draw is Microgen, Sabre and Tiamat, then the sim will play Microgen. If the sim is not in order, it may play Microgen, Sabre and Tiamat with equal chance.
|
|
|
tibia_fry
29 posts
|
Originally posted by Aapje:
You have a choice which cards to play of the 3 you get. ‘In order’ means that the sim tries to play the order as given. So if the ordered deck is Fortifier, Microgen, Sabre, Tiamat, etc and you the initial draw is Microgen, Sabre and Tiamat, then the sim will play Microgen. If the sim is not in order, it may play Microgen, Sabre and Tiamat with equal chance.
Thanks for the reply!
|
|
|
Herethios
19 posts
|
Hey Lefty!
If I get it right, I would have to be a collaborator in your Repository in order to work on your code without cloning it. I suppose I could now delete my repo and clone it again in order to get your werror branch. After my changes I can send you a pull request again and Bingo!
Correct?!?!
Greets Herethios
|
|
|
leftylink
86 posts
|
Originally posted by grrrmpf:
Thanks Leftylink for all the work you put into this! Quick question since I am not a git expert: How do I deal with git error messages like this (caused in this case by the “-lboost_chrono” required on Windows)?
error: Your local changes to the following files would be overwritten by merge: Makefile
Simply moving that file out of the way does unfortunately not seem to help.
The solution is obviously to become a git expert. It will make your life much better.
But actually:
git stash; (do whatever you need to do); git stash pop
Originally posted by Herethios:
Hey Lefty!
If I get it right, I would have to be a collaborator in your Repository in order to work on your code without cloning it. I suppose I could now delete my repo and clone it again in order to get your werror branch. After my changes I can send you a pull request again and Bingo!
Correct?!?!
Greets Herethios
You don’t have to delete your repo, though you can if you want. You can just add my repo as a remote (remote add leftylink git://github.com/leftylink/tyrant_optimize.git) and get whatever branches you want from it. Please keep in mind that I still rebase my branches, though. I guess I should stop doing that sometime.
Anyway, send a pull request whenever you like.
|
|
|
hunterhogan
1894 posts
|
Originally posted by leftylink:
Updates
Tue Dec 18 09:14:21 UTC 2012 Announced two small fixes: No more choking on ` character in raids.xml, and fix all compiler warnings.
I’ve waited tables a couple of times in my life—at the same place, which was a pretty nice restaurant. (Not $100 per person, but high-quality.) They had a thorough, excellent training program. One instructor made an off-hand remark that has always stuck with me. He said, “You can judge the quality of a restaurant based on its bathrooms. If a company cares about its customers, the bathrooms will be great.” (He—and other people—also said that you can tell how much a company cares about its employees based on the bathrooms it provides for the employees.) Bathrooms are not necessary for making good food, and clean bathrooms do not cook a steak properly. Nevertheless, my experience says that it is generally true that bad bathrooms equals bad food. Bottom line: bathrooms are not necessary for good food, but they probably send an accurate signal about a restaurant’s quality.
I know this is a weird story, but we all know I am weird person, so let’s just move on. In the announcement above, you took the time to make code that compensates for someone else’s error. Furthermore, anyone that can use your program has the skills to remove the offending character. Taking the time to code around these stray characters wasn’t necessary, but you did it anyway. Based on the bathroom analogy above, I think it is just another indicator of the quality of your work.
So, thank you. That was a long and weird way to tell you that you are doing a good job and many people appreciate the effort you put into cleaning the bathroom removing parsing errors that you didn’t create.
(And guys, lift the ****ing lid when you are in a public toilet. Yeah, I mean you: you lazy, barbaric, inconsiderate, disgusting, disease-spreading moron.)
|
|
|
Aapje
502 posts
|
PM’ed you with some code to print intermediate results.
|
|
|
leftylink
86 posts
|
Announcement of two things related to skill modifiers.
First, the “on Kill” suffix has just been implemented.
According to some lively discussion in Moraku’s Occupation skill guide, it seems we determined that the order of skill activations is on-kill, on-attacked, counter, on-death. tyrant_optimize implements this order.
A question for the community regarding Rally on Kill: Which units will it affect? It seems clear that it should not affect units to the left of the attacker, and it can affect units to the right of the attacker, but can it affect the attacker itself? An outstanding thread suggests that yes, it can.
tyrant_optimize implements the following behavior:
A unit with Rally on Kill that kills a unit can rally itself or any unit to its right, but will never rally any unit to its left.
I will change this if it is discovered that the game operates differently.
Second, a bug regarding “on Play on Death” has been fixed.
The bug report (both tests in the bug report now give the expected result):
A bug report from me to me!
Skills with “on Play on Death” modifier are handled incorrectly by tyrant_optimize. Specifically, the “on Death” half of the modifier is ignored, leaving only the “on Play” modifier.
Observe the following test case: Natasha and Hunter surging against Cyrus and Marshal. The Hunter activates on turn 4 and kills Marshal. In a correct implementation (SimTyrantJS), the Marshal then kills the Hunter with Strike 2 on Death. In tyrant_optimize, however, a 100% win rate is reported, meaning that the Marshal does not strike on death!
[leftylink@lefty:tyrant_optimize]$ ./tyrant_optimize PvAl PoJ6 -s climb 10000
Deck:
Natasha
Hunter
win%: 100 (10000 out of 10000)
Best deck: 100%
Natasha, Hunter
This will be fixed shortly, along with the “on Kill”’ suffix.
(And to make sure that the “on Play” portion of “on Play on Death” still works, I should also run ./tyrant_optimize PoJ6 PvAl -s climb 10000 and make sure the result is 100% win)
Originally posted by Aapje:
PM’ed you with some code to print intermediate results.
Got it. A diff would’ve been better (but I made one myself). Will take a closer look at it and decide what I want to do with it in the coming days…
|
|
|
Aapje
502 posts
|
Originally posted by leftylink:
Got it. A diff would’ve been better (but I made one myself). Will take a closer look at it and decide what I want to do with it in the coming days…
Yeah sorry. Git and me don’t get along so well.
|
|
|
ltdata123
50 posts
|
Hi.
Would it be possible, that in case when there is no ownedcards.txt in dir -r paramater would work? Just to shuffle cards to get better result?
Or to make some shuffle parameter?
Workaround is to put only deck’s cards into ownedcards.txt but it is quite long process :).
|
|
|
catepillar
2023 posts
|
Originally posted by ltdata123:
Hi.
Would it be possible, that in case when there is no ownedcards.txt in dir -r paramater would work? Just to shuffle cards to get better result?
Or to make some shuffle parameter?
Workaround is to put only deck’s cards into ownedcards.txt but it is quite long process :).
The -o flag and -r flag are unrelated. It should work with/without a ownedcards.txt.
|