[Freeciv-Dev] Re: code optimization ideas
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> It's not clear to me that caching this data provides a real win,
> though, without making the code massively more convoluted. Some of it is
> already convoluted enough to be scary.
>
> The real-time nature of the game doesn't help. If Freeciv were
> strictly turn-based as all other Civs were, most of these issues would
only
> change when you successfully attacked and killed an enemy. As it is, a
lot
> of calculations must be performed for each unit, because the world might
> have changed unexpectedly around you.
>
> More efficient high-level algorithms are appreciated. But they're
> not going to be easy to come up with.
> --
Answers to a few statistical questions about gotos, could help alot in
deciding where the problem/solution is.
As AI moves in start and end of round, they behave almost turnbased. so if
the following
1) How many % of the goto's are done by the AI.
(solution: Reduce the number of goto's by making them smarter)
This is probably not going to remove the problem so:
2) How many % of the AI's goto's are on continents, where there are no
enemies. (if it's a high percentage, then there can be done a scan of each
continent the AI got units on, if there is no enemies on it, it can move
without checking for ZOC).
If 2 is expensive to implement, because it might have to be done at start
and end of turn:
3) the ai are moving in start and end of turn, reduce that to once every
turn.
It seems more like wanting the ai to win, than having it play fair anyway.
This would half turn-based calculations, as it would only have to do them
once every turn.
/Claus Leth Gregersen.
- [Freeciv-Dev] code optimization ideas, Markus Linnala, 1999/09/22
- [Freeciv-Dev] Re: code optimization ideas, Markus Linnala, 1999/09/22
- [Freeciv-Dev] Re: code optimization ideas, Peter Schaefer, 1999/09/22
- [Freeciv-Dev] Re: code optimization ideas, Claus Leth Gregersen, 1999/09/22
- [Freeciv-Dev] Re: code optimization ideas, Tony Stuckey, 1999/09/26
- [Freeciv-Dev] Re: code optimization ideas, Peter Schaefer, 1999/09/26
- [Freeciv-Dev] Re: code optimization ideas, Peter Schaefer, 1999/09/26
- [Freeciv-Dev] Re: code optimization ideas,
Claus Leth Gregersen <=
- [Freeciv-Dev] Re: code optimization ideas, Jules Bean, 1999/09/26
|
|