Gamers' Lounge :  Conqueror! Forum
Arrange meeting times for new games, discuss past games and strategies, socialize with other players. 
Pages: 123Next
Current Page: 1 of 3
FairConGame Improvements(rebuild from scratch)
Posted by: Paars ()
Date: June 07, 2009 05:49AM

Here the link to download FairConGame as it is.
[77.251.112.110]
the faircongame.jar is the executeble.
the .rar file is just the .jar program in the rar in case the .jar won't download.

So I've heard a bit about that the program should/could be improved(acro) :p, so My plan is to rebuild the whole thing from scratch because the current coding is crappy.

I hope there's people here that have some reasoneble suggestions to improve the faircongame program and to post it in here.

Also I'm planning to make this open source and to explain what I've coded and why, so people can expand the program themselves if they feel need to.

The coding shall be done in Java again.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: Hubic Hair ()
Date: June 07, 2009 06:51AM

Not all provinces are there, Natolia is missing and another one aswell.

It also does not make my tea in the morning.

But seriously it does the job it is supposed to adequately.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: Paars ()
Date: June 07, 2009 06:55AM

True, Natolia missed and Crimea, that ll be fixed as well in new version. :p

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: LikeNoOthers ()
Date: June 07, 2009 07:00AM

Its should list how many lands that are, 2 steps from cap, 3 steps from cap.

Also, how many lands are next to the capital.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: Paars ()
Date: June 07, 2009 07:11AM

Good idea LNO, and not that hard to code in so will definetly add that in.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: Hubic Hair ()
Date: June 07, 2009 07:44AM

Here is a quirk that needs fixed:

Example: Portugal vs Greece

Both are 4 steps from Tunis and Tunis is therefore disputed. Using the program's coding it also shows Cyrenaica and Tripoli as disputed because they the same distance away. However Portugal can only get there through disputed Tunis and Greece can get there from his undisputed backland of Palestine. Therefore Cyrencaice and Tripoli should count as Greek provinces. This change is needed.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: Paars ()
Date: June 07, 2009 07:54AM

Have to think about that, the distance is still the same even tho tunis is disputed. it certainly is more advantage to greece through backlands.

I would like the opinion of others on that.



Edited 1 time(s). Last edit at 06/07/2009 07:58AM by Paars.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: LikeNoOthers ()
Date: June 07, 2009 08:01AM

Sounds hard though, but if you can do it, then its fine. But not REALLY important

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: LikeNoOthers ()
Date: June 07, 2009 08:10AM

What about, its gives % on the chances to each side?

Like Portugal and Greece.. Based on that Greece got more lands, more lands next to cap, etc. Then it says.. Portugal: 22% - 78% Greece

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: Hubic Hair ()
Date: June 07, 2009 08:14AM

LikeNoOthers Wrote:
-------------------------------------------------------
> Sounds hard though, but if you can do it, then its
> fine. But not REALLY important

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: Paars ()
Date: June 07, 2009 08:21AM

Btw what you guys think of teamgame options, tho 3v3 we all know the decent maps for 2v2 it might come in handy. And it could be good to find a decent 4v4 or even more people map.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: LikeNoOthers ()
Date: June 07, 2009 08:56AM

or 3v3 east vs west map.. They aren't so known

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: acro ()
Date: June 07, 2009 09:51AM

Here are my thoughts:

Its should list how many lands that are, 2 steps
from cap, 3 steps from cap.

Also, how many lands are next to the capital.


This was the first thing I thought when I used fairconqgame. This is what I originally meant by improving it. I also thought to edit it myself, but then realised I found it really difficult to see what was what in your coding (my programming abilities are amateur at best), so I'm glad you're making it edit-friendly.

Here is a quirk that needs fixed:

Example: Portugal vs Greece

Both are 4 steps from Tunis and Tunis is therefore
disputed. Using the program's coding it also
shows Cyrenaica and Tripoli as disputed because
they the same distance away. However Portugal can
only get there through disputed Tunis and Greece
can get there from his undisputed backland of
Palestine. Therefore Cyrencaice and Tripoli
should count as Greek provinces. This change is
needed.


I understand what you're saying, but this seems overly complicated. I am neutral on this one.

2v2/3v3 maps would be a nice option.

Good luck!



Edited 1 time(s). Last edit at 06/07/2009 10:00AM by acro.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: Lancelot ()
Date: June 07, 2009 01:14PM

I also think we may rather use a weighted graph. A simple weighting can be done by weighting the distance inverse proportionally. So for example a land with 1 move away will have weight 1 and 2 moves away will have weight 1/2. Since it is important for expansion and effect over happiness it is important.

Another addition to weighting can be Sum(inverse proportional distance) This can be used for disputed lands, and caps' difference will be subtracted to give you who's land it is.

Also this weighting can be used not just as number of lands but also total points your cap has giving you a better idea about how centralized your capital is.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: Paars ()
Date: June 07, 2009 01:34PM

In general your idea sounds good lance, but could elaborate a bit more?I'm a bit slow today ;)

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: acro ()
Date: June 07, 2009 01:47PM

Why use some convoluted formula to give an overall number when we can simply list the number of lands at a distance of 1,2,3,4... away and give a much more detailed picture? I don't think you can assign a number of points for each distance as no-one knows for sure the relative values - it is much better to just list it as follows:

1 Away (4): Eire, Wales, Northumberland, Scotland
2 Away (2): Norway, England
3 Away (6): Sweden, Denmark, ...
...
Total: 25

How about an option to show/hide the list of countries, so without it you have a simple table:

1 Away (4) 1 Away (5)
2 Away (7) 2 Away (7)
3 Away (12) 3 Away (9)
...
Total: 31 Total: 29

I am not sure I totally understand your second point Lance, are you saying we sum 1/d for each of the different ways to get to that land and see which is higher? Please go into more detail.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: Lancelot ()
Date: June 07, 2009 02:54PM

Well, since the algorithm is recursive, you can send a variable n to depict the number of recursions, and will know the distances when u r assigning the weight. So it will be in the form:

double AssignWeightedValue(int n, double totalValue, country province)
{
totalValue += CalculateTotalPointsForRelatedCap(n, province);

country nextProvince = GetClosestProvinceInList();
totalValue += AssignWeightedValue(n, totalValue, nextProvince);

return totalValue;
}

double CalculateTotalPointsForRelatedCap(int n, country province)
{
double total = 0;

foreach unvisited neighbor of province
{
total += VisitCountry(n, neighbor);
}

return total;
}

of course they will take extra variables and do more operations, but this is a c-based pseudo code just to give a better idea, and it is not for summing up values for disputed lands, that's a little bit more complex (this just calculates the total value of the shortest paths for a capital).



Edited 1 time(s). Last edit at 06/07/2009 02:57PM by Lancelot.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: Lancelot ()
Date: June 07, 2009 03:00PM

Yes Acro the calculation on my mind was to sum up 1/d for disputed lands.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: acro ()
Date: June 07, 2009 04:10PM

Lancelot Wrote:
-------------------------------------------------------
> Yes Acro the calculation on my mind was to sum up
> 1/d for disputed lands.

It would just sum to infinity as there are an inifinite number of ways to get from one province to another. If we disregard any path with a loop, we still have a ridiculously large number of paths. If we disregard a path where there is a shorter path, well then we are back to square one as there is only one shortest path.

If we count the shortest paths such that no two paths share countries other than the cap and disputed country, then perhaps we are a bit closer, but it still doesn't really work as we have a number of unrealistic paths (try an example). This is the best option in my opinion and I can't think of a reasonable improvement.

Am I missing something here? I just can't see how your idea works in any way? It's a lot of code for an unreliable result.

Plus even if it did work, a disputed country that is slightly in your favour should not count as your country.

Keep it simple.

Options: ReplyQuote
Re: FairConGame Improvements(rebuild from scratch)
Posted by: acro ()
Date: June 07, 2009 04:31PM

Ok I said something stupid, there isn't necessarily one shortest path, which suggests the option of choosing the land with more shortest paths, but I don't like this either. Count only shortest paths using any country except cap and disputed land no more than once? Perhaps. It works for Hubert's example but in say England v Bohemia, do we want to say Lux belongs to England? I'd prefer to just call it disputed. And for simplicity I'd just call Tripoli disputed in the earlier example.

Final alternative suggestion: Tunis is disputed so the program says it is half each. If west has Tunis (p=0.5) then Tripoli is disputed (half each) but if east has tunis then Tripoli is his completely.

So we say west gets 0.5*0.5 + 0.5*0 = 0.25 for Tripoli and east gets 0.5*0.5 + 0.5*1 = 0.75.

The main question is though, do we really need to take this into account? After all, no map is totally fair anyway, fairconqgame just aims to tell you whether it is approximately fair.

Options: ReplyQuote
Pages: 123Next
Current Page: 1 of 3


Sorry, only registered users may post in this forum.