[Freeciv-Dev] PATCH: AI cleanup Version 2
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Added the patch that Raimar sent. I'm almost ready to finish the changes to
the ai. Version 3 will wrap up all changes. This patch applies cleanly
against Nov 20 CVS, the autogames are not changed.
GB: I'm sending you a list of places where the ai has igter code.
Code that affects igter units
aiunit.c:func ai_military_gothere:835
advmilitary.c:func process_attacker_want:line 580
if (unit_flag(punit, F_IGTER)) d_val /= 1.5;
aiunit.c:func find_something_to_kill:1230
1255
1432
advmilitary.c:func kill_something_with:line 707
if (unit_type_flag(v, F_IGTER)) m *= 3;
line 782
if (unit_flag(pdef, F_IGTER)) dist *= 3;
}
if (!dist) dist = 1;
m = unit_types[v].move_rate;
if (unit_type_flag(v, F_IGTER)) m *= 3;
Send me any lines I may have missed in the AI referring to the igter units.
Once we have documented all the lines we can change it.
- Document/cleanup AI code. Rename variables to more saying names than these:
int a, c, d, e, i, a0, b0, f, g, fprime;
int j, k, l, m, q;
Somewhat fixed in this patch. Ver 3 will fix all the ones I am sure of.
- Unkluge the worst AI kludges. The ones I know of are:
- on the goto map the move cost of units with F_IGTER is multiplied with 3
I need your help with this Gregory. You need to make the warmap changes.
- the goto map of ships overlap one field onto land
This cannot be fixed. Remove this item from the Todo, the current freeciv
code would need a massive rewrite to do this.
- Replace the use of the value 255 in relation to the warmap with the
MAXCOST constant.
- Make the server warmap use short instead of char, and raise MAXCOST from
255 to the maxvalue of a signed short.
Coming in my next patch.
Raimar, can you appply the warmap patch that GB sent in? It makes changing the
AI and fixing the awful kludges much easier.
__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
aicleanupv2.diff
Description: aicleanupv2.diff
- [Freeciv-Dev] RFC: Fixing movement code, Raahul Kumar, 2001/11/21
- [Freeciv-Dev] Re: RFC: Fixing movement code, Raimar Falke, 2001/11/21
- [Freeciv-Dev] Re: RFC: Fixing movement code, Raahul Kumar, 2001/11/21
- [Freeciv-Dev] Re: RFC: Fixing movement code, Raimar Falke, 2001/11/22
- [Freeciv-Dev] Re: RFC: Fixing movement code, Gregory Berkolaiko, 2001/11/22
- [Freeciv-Dev] Re: RFC: Fixing movement code, Raimar Falke, 2001/11/22
- [Freeciv-Dev] Re: RFC: Fixing movement code, Raahul Kumar, 2001/11/22
- [Freeciv-Dev] Re: RFC: Fixing movement code, Raimar Falke, 2001/11/23
- [Freeciv-Dev] PATCH: AI cleanup Version 2,
Raahul Kumar <=
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Petr Baudis, 2001/11/23
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raimar Falke, 2001/11/23
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Petr Baudis, 2001/11/23
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raahul Kumar, 2001/11/23
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raimar Falke, 2001/11/24
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Petr Baudis, 2001/11/24
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raimar Falke, 2001/11/24
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Petr Baudis, 2001/11/24
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raimar Falke, 2001/11/25
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Petr Baudis, 2001/11/25
|
|