# Topic: Completion of a map by symmetry

gnarfk |
Posted at: 2015-01-23, 19:46
That is one of the reasons making me think of that idea Top Quote |

gnarfk |
Posted at: 2015-01-26, 08:26
I've searched for a description of the wrmf file format, but i could'nt find it. Could someone help me find it ? i can try to implement these symmetries or rotations, to see what could be the results. Top Quote |

teppo |
Posted at: 2015-01-26, 17:34
With symmetries one has too keep in mind, that there is an up/down intrinsic asymmetry, and also to some extent a left-right asymmetry. Also I have the feeling, that mining north facing slopes of a symmetric mountain would be more difficult than mining its south-facing slope. I have not checked the last one, though. On some perfectly symmetric maps this leads to remarkable disadvantage to the player that has to expand south. Rotational / mirror symmetry does not guarantee a fair play. Having an easy way to make symmetric maps would, of course, still be wonderful. It would be fun to make a way to run full-AI games en masse, and determine fairness from the distribution of those outcomes. Unfortunately, I cannot invest enough time in the near future. Edited: 2015-01-26, 17:35
Top Quote |

wl-zocker |
Posted at: 2015-01-26, 18:46
Do you mean "wmf"? Those are Widelands map files, which in fact are only zipped folders. You can rename them to
I do not think so. Widelands mountains cannot be so steep that visibility could be a problem.
That is what I already mentioned in my first post
gnarfk suggested to mirror on the northwest-southeast axis, which produces fair two-player maps (the flag of buldings is the only asymmetry I know of). Other maps might need small adjustments (e.g. moving the starting position a bit) to compensate the asymmetry. "Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg Top Quote |

SirVer |
Posted at: 2015-01-26, 21:12
Drive by comment: In debug mode one can use Lua scripting to quickly prototype a useful tool - just make a lua script and use "dofile" to run it over your map. Top Quote |

einstein13 |
Posted at: 2015-01-27, 00:51
I've created a work about the rotations on Widelands' map. It is on my webpage about Widelands: http://student.agh.edu.pl/~rak/widelands/ . Also available on direct link to pdf: http://student.agh.edu.pl/~rak/widelands/files/RotationsOfMap/Rotations_1.00.pdf . My idea works perfectly with 60*n (n-natural) degrees rotation. With another degrees it needs some interpolation (not too many). The file contains my look into the problem. Pure solutions for small steps and some coding tips. You can use and test, as you want. If there is any mistake, please tell me- I will try to fix it. Also I need some feedback, so if anything is not understandable, please tell me. einstein13 |

gnarfk |
Posted at: 2015-01-27, 10:51
There is at least one symmetry that keeps things perfectly fair : the axle following the same direction that between a building and its flag. Top Quote |

gnarfk |
Posted at: 2015-01-27, 11:08
I just read your file. It looks like a good job. I have just some questions : 1)when your computer computes the cosine and sine, does it make some approximations ? (if it keeps 10 floating number i think it is enough) 2) you talk about zigzagvector , squarevector , cartesianvector . do squarevector and cartesianvector are the same thing ? i don't get the point of using 3 types of vectors and i have some idea of optimisation: in this code , you give the angle as parameter , and the function calculates the matrix for each vector. maybe it should be better to calculate the matrix , and then give the matrix as a parameter. (it should also help using the same code for symmetries ) And a last thing : could you show me the code that lead to the "failing triangle rotation of 90°" ? maybe i can help you fix this Edited: 2015-01-27, 11:08
Top Quote |

einstein13 |
Posted at: 2015-01-28, 03:48
Thanks I'm trying to do good job
Default, machine precision means 15 floating number. I can make more- it is optional.
It is the same, and not the same. Maybe you're right that I shouldn't complicate that, but there were: 2 vectors (discrete Cartesian, discrete Zigzag) and their representation on Cartesian plane. I used 3 vectors to do that. Discrete Cartesian can be extrapolated into continuous plane, as you want
Yes, I thought that I mensioned about that in the text. If not- sorry for that. That is a great optimalization, but to be specific I used most exstensive form I know.
All code is in .nb file. I used Wolfram Mathematica to check the algorithm and all the calculations. I know that formulas are in Polish- If I have some time, I will translate it into English and put in one place. http://student.agh.edu.pl/~rak/widelands/files/RotationsOfMap/rotationsMathematica_1.00.pdf There are all definitions like a compilation of math and programmistic formulas. I didn't make any specific language code. Only Mathematica. To fix the rotation of 90° we can think about better idea how to rotate. I have one, but it is so complex that I can do it only manualy That contains shape- analysis, some statistics and differential forms. It shouldn't be like that EDIT: The problem with rotation exists when we have to look for nearest discrete point. You can think about formula that will find nearest discrete zigzag point and be shape-safe. My idea didn't save any information about the shape. Edited: 2015-01-28, 03:55
einstein13 |

gnarfk |
Posted at: 2015-01-28, 08:55
I just want to point out that personally, i prefer rotations of multiples of 60°, which are easy and efficient (for the objective we had first). But we can try to have a "good enough" method for other ones .
We have to think about widelands structure. Different types of informations have to be interpolated differently 1) In a edge , we have some algebrical informations : for instance the altitude . so , the altitude of a point can be literally an interpolation of the altitude of the points near to him . Things could be computed in another way. For ressource type and ressource amount and bobs, things could be complicated if the edge is between edges which have different ressource types ... 2) The fields , we have the terrain type. you have to think the image of a field with your rotation. we have to find a way to keep neighbour fields neighbour .... i don't see any easy way to solve these "non alebric" things without this "nearest point" strategy, but this strategy isn't good . (2 edges could fall on the same one after the rotation ....) But : if we find a solution for the 90° rotation (which may be particular enough to find a trick) , we will have solutions for any multiple of 30° . Top Quote |