Page 2 of 2

Re: genetic algorithm on shard

Posted: 04 Jun 2015, 21:58
by prandipadaro
sorry i have 2 engine installed 96 and 98 but if i launch with:
spring-headless /home/p/.spring/engine/98.0/script.txt
the problem is the same,

it is as if spring would use only the version 96, how can I tell it to use the 98?

Re: genetic algorithm on shard

Posted: 04 Jun 2015, 22:07
by abma
start with
/home/p/.spring/engine/98.0/spring-headless /home/p/.spring/engine/98.0/script.txt
and maybe uninstall the system installed spring to avoid confusion. (sth. like apt-get remove spring). you can't do that if springlobby gets uninstalled, too. this dependency was hopefully removed in newer versions of springlobby by package maintainers.

Re: genetic algorithm on shard

Posted: 04 Jun 2015, 22:51
by prandipadaro
just reinstalled all, so spring and spring-headless works fine!!!!! thanks.
only some trouble with springlobby 217 but maibe is not very important.
abma great
I will continue tomorrow

Re: genetic algorithm on shard

Posted: 30 Jun 2015, 12:32
by prandipadaro
Even if I did not say anything, the work continued.
An unstable and sloppy versionof a script that looks like a genetic algorithm is almost ready.
At this point I would need a pair of little help:

The thing that interests me most now is the chance to re-start a battle through
spring-headles path/to/script.txt
soon as the previous battle has ended. This is essential to be able to simulate an indefinite number of generations.
i need suggestion and help to make this.

Another point, a bit 'less essential:
I started to pull constants most interesting from files in Shard/dev/ai/BA in order to start working on it. If someone with a little knowledge about shard is able to give accurate information about what are the constants that have greater sense optimizing it could be me to help mainsails

Re: genetic algorithm on shard

Posted: 30 Jun 2015, 20:06
by AF
To which constants are you referring?

Re: genetic algorithm on shard

Posted: 30 Jun 2015, 20:26
by prandipadaro
for now i have used some constants in AI/Skirmish/Shard/dev/ai/BA/
in the file file: taskqueuebehaviour.lua for example
in the formula at line 19:

Code: Select all

local enoughMetalReserves = math.min(ai.Metal.income, ai.Metal.capacity * var._enoughMetalReserves_)
the variable

Code: Select all

var._enoughMetalReserves_
is in another file and i go to optimize it

in the file: unitlists.lua

Code: Select all

-- for calculating what factories to build
-- higher values mean more effecient
mobilityEffeciencyMultiplier = {
	veh = var.q_veh,
	shp = var.q_shp,
	bot = var.q_bot,
	sub = var.q_sub,
	hov = var.q_hov,
	amp = var.q_amp,
	air = var.q_air,
}

-- for calculating what factories to build
-- higher values mean slower
mobilitySlowMultiplier = {
	veh = var.w_veh,
	shp = var.w_shp,
	sub = var.w_sub,
	bot = var.w_bot,
	hov = var.w_hov,
	amp = var.w_amp,
	air = var.w_air,
}


and i can show you other example
to start my project can do these few things.
To obtain a good result would need to work on significant constants and in a good number.