Can you add a print statement like Toni did? Or something like:
print(("Counting valuable fields took: %dms, result is %d."):format(ticks() -
start, #result))
For Glacier lake the output on my slow laptop is:
Counting valuable fields took: 803ms, result is 4015.
--
https://code.launchpad.net/~
Continuous integration builds have changed state:
Travis build 4489. State: passed. Details:
https://travis-ci.org/widelands/widelands/builds/494551119.
Appveyor build 4277. State: success. Details:
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_181566
as the underlying bug is really a shortfall on some maps and it is ensured we
are still delivering a properly indexed fields table I would think this is
worth going into b20, as it is not introducing new functionality.
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territoria
ok done. Now we start our algorithm with all starting fields of all players and
all port spaces.
the port space scan is a little consuming. (it doubles the scan time i think)
but still i think it is ok.
I reduced the radiuses by one for each caps. (9, 7, 5) which is reasonable. I
excluded unw
No, testing with OSX is not required - this branch only affects the Windows
builds downloadable from AppVeyor
--
https://code.launchpad.net/~widelands-dev/widelands/appveyor-fix/+merge/363152
Your team Widelands Developers is requested to review the proposed merge of
lp:~widelands-dev/widelands/
Us tesing with OSX a) requireed
n) if yes where can I downlaod the artifacts from
https://travis-ci.org/widelands/widelands/builds/493702657 or such?
--
https://code.launchpad.net/~widelands-dev/widelands/appveyor-fix/+merge/363152
Your team Widelands Developers is requested to review the propose
GunChleoc has proposed merging
lp:~widelands-dev/widelands/bug-1815664-crash-conquer-tower into lp:widelands.
Commit message:
Stop ware dropoff when the target building has been destroyed.
This fixes a crash when the enemy conquers a militarysite near a warehouse.
Requested reviews:
Widelands
for the moment I am fine with this branch
so if anyone could test the artifacts we could merge this.
--
https://code.launchpad.net/~widelands-dev/widelands/appveyor-fix/+merge/363152
Your team Widelands Developers is requested to review the proposed merge of
lp:~widelands-dev/widelands/appveyor-f
@ GunChleoc: exactly!
I will try to implement this tonight. At the moment I am busy watching my
favourite football team so sorry for the delay
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366
Your team Widelands Developers is subscribed to
Yes, port spaces also have big caps. I think the point was though if you have
an island without a starting field and a port space, we need a field to seed
calculation for that island.
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366
Your t
We use Glew in the non-Windows builds as well, so if it works that will be good
enough for me.
--
https://code.launchpad.net/~widelands-dev/widelands/appveyor-fix/+merge/363152
Your team Widelands Developers is requested to review the proposed merge of
lp:~widelands-dev/widelands/appveyor-fix in
BTW don't have port spaces also the big caps?
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366
Your team Widelands Developers is subscribed to branch
lp:~widelands-dev/widelands/bug-1810062-territorial-calculations.
___
I'm fiddling around with the radius. Because Glacier is still a little too big
and I think we shouldn't go to the extreme limits. What could be suitable
values:
big:8
medium: 6
small: 4
In Oasis this would result in 11655 fields, which is reasonable. 14000 Fields
is way to many to get 50%
Awesome! I pushed your second try.
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366
Your team Widelands Developers is subscribed to branch
lp:~widelands-dev/widelands/bug-1810062-territorial-calculations.
_
Another thing which is supporting my latest trial is that the actual coverage
of fields is calculated against the fields originally identified.
so the algorithm is player x owns yy fields of all fields identified as
valuable.
so not only the number is relevant but it matters which fields are id
Sorry. for some reasons the comments didn't get updated on my machine.
My latest chunk of code is delivering all fields that could be reasonably
conquered on a map.
with big = 10 and medium = 8 and small = 6 it delivers 4768 on Glacier lake.
So for me this value sounds reasonable.
for Oasis tri
Next try I have done is starting from the starting field and add all fields
that can be conquered.
function get_valuable_fields()
local fields = {}
local check = {}
local map = wl.Game().map
local sf = map.player_slots[1].starting_field
-- initilaize with the region around the sta
I think this could be it. Fast calculations with appropriate sizes.
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366
Your team Widelands Developers is subscribed to branch
lp:~widelands-dev/widelands/bug-1810062-territorial-calculations.
_
I'm torn. I love hessenfarmers approach so much, since it is so blazingly fast.
But the calculated areas are too large.
I think r8970 is better ATM, since the calculated areas are more suited for
Territorial.
Could we somehow marry both approaches?
--
https://code.launchpad.net/~widelands-de
ok after agoing through all military buildings i think small = 6 medium = 8 and
big = 10 are good values.
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366
Your team Widelands Developers is subscribed to branch
lp:~widelands-dev/widelands/b
hm.. i was too slow... my comment was meant for r8970 of this branch...
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366
Your team Widelands Developers is subscribed to branch
lp:~widelands-dev/widelands/bug-1810062-territorial-calculations
Review: Approve testing
This is working nicely i think :) Some values with my Celeron 900:
Oasis Triangle:
Finished initial calculations after 21 minute(s) and 57 second(s).
The Nile:
Finished initial calculations after 21 minute(s) and 39 second(s).
Together we're strong:
Finished initial calc
Awesome, your approach is so much more elegant. I pushed it to the branch.
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1810062-territorial-calculations/+merge/361366
Your team Widelands Developers is subscribed to branch
lp:~widelands-dev/widelands/bug-1810062-territorial-calculati
I had a eureka moment as well. Here is my code which is very fast (just some
seconds.)
function get_valuable_fields()
local fields = {}
local map = wl.Game().map
for x=0, map.width-1 do
for y=0, map.height-1 do
local f = map:get_field(x,y)
if f:has_max_caps("small
24 matches
Mail list logo