[Freeciv-Dev] [patch #2143] [RFC] AI interface using lua

2010-10-30 Thread Matthias Pfafferodt

Follow-up Comment #2, patch #2143 (project freeciv):

 It sounds a good idea. But, we probably need to decide about
 what we want to do: AI at server side in C, AI at server side  lua
scripted or AI client side. As I understand patch #1785 or
 patch #1846, we were going to a server side AI... 

I do not consider client side AI an option. As discussed somethere (I did not
find the source), the AI is coupled to the knowledge of the server which will
not be available in the client. Thus, a client side AI would never be as good
as a server side AI.

Furthermore, there should be distinguished between AI and advisors. The AI
belongs into the server but advisors for the player (as in 'small helper
script') could be part of the client. They would use only the players
knowledge.

About the language to use for server side AI, this ticket is the place to
discuss it. A lua implementation would allow to (easily?) save the AI state
similar as done for the server lua script.

patch #1785 is at the moment on hold. I have to revise the patches to the
current state of trunk.

patch #1846 would be of interest to speed up the AI. I think, one lua state
for each AI would help here (i.e. one lua state could be assigned to one
thread?).

Short summary of some comments to this toppic I found using google:

 The second problem is that, provided the AI feature is
 client-side in a client-server game, those who have the better
 AI scripts or AI code will gain a substantial advantage. This
 is particularly the case in multiplayer games that use a
 timeout timer to end turns. The unofficial Freeciv 'warclient'
 gives players mass control over units and is a substantial aid
 in timeout games. While some may find this (writing their own
 AI-aid code) a challenge on its own, it is inherently unfair
 and detracts focus from the core game concepts.
[http://freeciv.wikia.com/wiki/4x_Design]

Why client-side AI could be a Bad Thing (nice read!):
[http://thread.gmane.org/gmane.games.freeciv.devel/6545/focus=6560]

Discussion of client-side AI and AI using lua:
[https://mail.gna.org/public/freeciv-dev/2010-05/msg00118.html]

Discussion of client side AI in the freeciv forum:
[http://forum.freeciv.org/viewtopic.php?t=757]

Using function pointers for the AI functions and a comment by Per to the
complexity of the AI:
[http://forum.freeciv.org/viewtopic.php?t=1386]

Why the AI is in the server (again comment by Per):
[http://forum.freeciv.org/viewtopic.php?t=52]

Old try on client side AI (puppeteer):
[http://blog.gmane.org/gmane.games.freeciv.ai/month=20040301]
[http://download.gna.org/freeciv/incoming/puppeteer.patch.cvs-Sep-09_0.006.diff.gz]

A good summary of the problems with the AI by Per:
[http://permalink.gmane.org/gmane.games.freeciv.ai/1454]


___

Reply to this item at:

  http://gna.org/patch/?2143

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2115] [fcdb] redo lua script

2010-10-30 Thread Matthias Pfafferodt

Follow-up Comment #3, patch #2115 (project freeciv):

 As discussed previously in bug #15587, and according the
 comment in api.pkg, are you sure the interface is still
 compatible with the current one? (notably with the new ways
 for doing logs...) 

Yes, all functions currently implemented will still work. For the logging,
wrapper functions are implemented. The new style is similar to the functions
calls in the C code (C: log_normal(); lua: log.normal()).

___

Reply to this item at:

  http://gna.org/patch/?2115

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2121] [fcdb] add delegation (especially for longturn)

2010-10-30 Thread Matthias Pfafferodt

Follow-up Comment #2, patch #2121 (project freeciv):

 Why does it requires auth support enabled? 

Because I did use the longturn usage as example and guideline?

Yea, it could be done entirely in the server without an external database ...
I will have to think about this. Thanks for the comment.

___

Reply to this item at:

  http://gna.org/patch/?2121

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16971] Resolve 'transform' (terrain) vs 'transform' (units) terminology

2010-10-30 Thread HanduMan

Follow-up Comment #3, bug #16971 (project freeciv):

My suggestions are based on the idea that a 'unit' in freeciv should be seen
as a troop of units rather than one single unit.

___

Reply to this item at:

  http://gna.org/bugs/?16971

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16965] Solar Plant increases pollution with Recycling Center but no Factory/Mfg. Plant

2010-10-30 Thread Jacob Nevins

Update of bug #16965 (project freeciv):

  Status:  Ready For Test = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?16965

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2010-10-30 Thread Matthias Pfafferodt

Follow-up Comment #11, bug #14515 (project freeciv):

 (This would be easier to express in the ruleset if the effects
 system could combine numbers in more ways than just addition,
 such as min() and max(). But that's probably a separate bug.)

Perhaps an additional field could be added to the effects definition. It
could define how the numbers should be combined. But this raises the problem
of the order of the effects, i.e


[effect_test1]
  name  = test
  operation = ADD
  value = 16

[effect_test2]
  name  = test
  operation = MIN
  value = 20

[effect_test3]
  name  = test
  operation = DIV
  value = 2


depending on the order this could result in

min((0 + 16), 20) / 2 = 8
min(0, 20) / 2 + 16 = 26
min((0 / 2), 20) + 16 = 36
... (and some more combinations)





___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16974] I can not load auto save beacuse file is empty

2010-10-30 Thread anonymous

Follow-up Comment #2, bug #16974 (project freeciv):

Hello 
I've jsut install freeciv form ubuntu depot (10.10 version).
I forgot to notice that game or OS crash completely. I must reboot.
I Have 5 auto-save file empty, the file before was good

Benoit Soyeux

___

Reply to this item at:

  http://gna.org/bugs/?16974

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2010-10-30 Thread Matthias Pfafferodt

Follow-up Comment #13, bug #14515 (project freeciv):

perhaps an additional 'priority' flag could be used? On ruleset load there
must be a check that for each effect no priority is duplicated. Furthermore,
the effects must be saved in the corresponding order.

___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16974] I cannot load auto save because file is empty

2010-10-30 Thread pepeto

Update of bug #16974 (project freeciv):

 Summary: I can not load auto save beacuse file is empty = I
cannot load auto save because file is empty


___

Reply to this item at:

  http://gna.org/bugs/?16974

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16980] Grammar fixes in CodingStyle

2010-10-30 Thread pepeto

Update of bug #16980 (project freeciv):

  Status:None = In Progress
 Planned Release: = 2.3.0  

___

Follow-up Comment #2:

I assume this is for trunk. Nearly similar changes could probably be done in
S2_2 too. Also, http://freeciv.wikia.com/wiki/Coding_Style would need to be
modified.

 Well, this is embrassing. I meant to submit this to the patch
 tracker :\

 Could someone move this ticket there?

It is ok, this can be considered as a bug.


___

Reply to this item at:

  http://gna.org/bugs/?16980

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16971] Resolve 'transform' (terrain) vs 'transform' (units) terminology

2010-10-30 Thread David Lowe

Follow-up Comment #4, bug #16971 (project freeciv):

Yeah, i'd vote for 'convert'.

___

Reply to this item at:

  http://gna.org/bugs/?16971

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16980] Grammar fixes in CodingStyle

2010-10-30 Thread Liktaras G.

Follow-up Comment #3, bug #16980 (project freeciv):

Yes, that is for trunk. I have also attached a patch for S2_2 branch and made
the changes in the wiki page.

I am sorry for this blunder.

(file #11018)
___

Additional Item Attachment:

File name: s2_2-coding-style-grammar-fixes.diff Size:2 KB


___

Reply to this item at:

  http://gna.org/bugs/?16980

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16648] Memory leak with ai_data_phase_init()/ai_data_phase_done()

2010-10-30 Thread pepeto

Update of bug #16648 (project freeciv):

  Status:None = Ready For Test 

___

Follow-up Comment #2:

Fix attached: it discard calls to ai_data_phase_init() if it was previously
called. Same thing with ai_data_phase_done() if the phase was not
initialized.


(file #11019, file #11020)
___

Additional Item Attachment:

File name: trunk_ai_data_phase.diff   Size:2 KB
File name: S2_2_ai_data_phase.diffSize:1 KB


___

Reply to this item at:

  http://gna.org/bugs/?16648

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16981] Memory leak in check_for_game_over()

2010-10-30 Thread pepeto

URL:
  http://gna.org/bugs/?16981

 Summary: Memory leak in check_for_game_over()
 Project: Freeciv
Submitted by: pepeto
Submitted on: samedi 30.10.2010 à 16:48
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
  Status: Ready For Test
 Assigned to: pepeto
Originator Email: 
 Open/Closed: Open
 Release: S2_2
 Discussion Lock: Any
Operating System: None
 Planned Release: 2.2.4

___

Details:

Fix for S2_2, as trunk is already fixed.

Valgrind report:

==24930== 75 bytes in 5 blocks are definitely lost in loss record 819 of 952
==24930==at 0x4C274A8: malloc (vg_replace_malloc.c:236)
==24930==by 0x50AA52: fc_real_malloc (mem.c:82)
==24930==by 0x50D837: astr_minsize (astring.c:85)
==24930==by 0x50D879: astr_clear (astring.c:189)
==24930==by 0x407C97: check_for_game_over (srv_main.c:255)
==24930==by 0x40B374: srv_running (srv_main.c:2087)
==24930==by 0x40BD5E: srv_main (srv_main.c:2438)
==24930==by 0x403904: main (civserver.c:359)





___

File Attachments:


---
Date: samedi 30.10.2010 à 16:48  Name: S2_2_check_for_game_over.diff  Size:
717 o   By: pepeto

http://gna.org/bugs/download.php?file_id=11021

___

Reply to this item at:

  http://gna.org/bugs/?16981

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16980] Grammar fixes in CodingStyle

2010-10-30 Thread pepeto

Update of bug #16980 (project freeciv):

  Status: In Progress = Ready For Test 
 Assigned to:None = pepeto 

___

Follow-up Comment #4:

Thank you a lot.

 I am sorry for this blunder.

Don't be, your help is very appreciated!


___

Reply to this item at:

  http://gna.org/bugs/?16980

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16980] Grammar fixes in CodingStyle

2010-10-30 Thread pepeto

Update of bug #16980 (project freeciv):

 Planned Release:   2.3.0 = 2.2.4, 2.3.0   


___

Reply to this item at:

  http://gna.org/bugs/?16980

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2077] Add optional separate rule name for ruleset objects, allowing them to be renamed

2010-10-30 Thread Jacob Nevins

Update of patch #2077 (project freeciv):

  Status:  Ready For Test = Done   
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?2077

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2050] First-class help for specialists

2010-10-30 Thread Jacob Nevins

Update of patch #2050 (project freeciv):

  Status:  Ready For Test = Done   
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?2050

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16973] Non-ASCII char in TRANS comment causes gettext error

2010-10-30 Thread Daniel Markstedt

Update of bug #16973 (project freeciv):

  Status:  Ready For Test = Fixed  
 Assigned to:None = dmarks 
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?16973

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2082] Pashtun nation

2010-10-30 Thread Daniel Markstedt

Update of patch #2082 (project freeciv):

  Status:  Ready For Test = Done   
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?2082

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2083] Togolese nation

2010-10-30 Thread Daniel Markstedt

Update of patch #2083 (project freeciv):

  Status:  Ready For Test = Done   
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?2083

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2084] Zimbabwean nation

2010-10-30 Thread Daniel Markstedt

Update of patch #2084 (project freeciv):

  Status:  Ready For Test = Done   
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?2084

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2145] Path finding cleanup

2010-10-30 Thread pepeto

URL:
  http://gna.org/patch/?2145

 Summary: Path finding cleanup
 Project: Freeciv
Submitted by: pepeto
Submitted on: dimanche 31.10.2010 à 02:28
Category: agents
Priority: 5 - Normal
  Status: Ready For Test
 Privacy: Public
 Assigned to: pepeto
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 2.3.0

___

Details:

Path finding cleanup. Step to patch #1303.


FEATURES:
* Added int pf_map_move_cost(struct pf_map *, struct tile *).
* Direction (-1) is a macro: PF_DIR_NONE.
* Use minimal size for the nodes (e.g. pf_normal_node size was 20 bytes, it
is now 16 bytes).
* Changed when NS_PROCESSED is assigned, and simplified tests to know if a
tile reachable. (Now, the node status is NS_PROCESSED or NS_WAITING, the tile
iterator test is not needed anymore.)
* pf_danger_map_iterate_until() and pf_fuel_map_iterate_until() are slightly
improved.
* Merged function comments from path_finding.h to path_finding.c
* Full review of the documentation. Numerous comments added about how it
works.


NAME CHANGES:
* Macros pf_map_iterate_* and pf_map_iterate_*_end renamed to
pf_map_*_iterate and pf_map_*_iterate_end to be closer to the most iterating
macros.
* pf_map_get_*() renamed to pf_map_*().
* pf_map_iterator_get_*() renamed to pf_map_iter_*().
* pf_path_get_last_position() renamed to pf_path_last_position().
* pf_city_map_get_move_cost() renamed to pf_city_map_move_cost().




___

File Attachments:


---
Date: dimanche 31.10.2010 à 02:28  Name: 0001-Path-finding-cleanup.patch 
Size: 206 ko   By: pepeto

http://gna.org/patch/download.php?file_id=11026

___

Reply to this item at:

  http://gna.org/patch/?2145

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1303] Replace warmap by path finding code in ai/ directory

2010-10-30 Thread pepeto

Update of patch #1303 (project freeciv):

  Depends on: = patch #2145


___

Reply to this item at:

  http://gna.org/patch/?1303

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16983] Poor choice of city worked tile

2010-10-30 Thread Daniel Markstedt

URL:
  http://gna.org/bugs/?16983

 Summary: Poor choice of city worked tile
 Project: Freeciv
Submitted by: dmarks
Submitted on: Sunday 10/31/2010 at 12:33
Category: None
Severity: 3 - Normal
Priority: 7 - High
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: trunk
 Discussion Lock: Any
Operating System: None
 Planned Release: 2.3.0

___

Details:

Recent code seems to make poor choices of when it comes to worked tiles in
cities...

For example, check out the Eritrean city of Nakfa - even though there's an
ocean tile with whales two tiles up, the code keeps choosing a plain ocean
tile for you instead. You can still choose the whales manually, but as soon
as the city grows f.e., the whales tile is not worked again.



___

File Attachments:


---
Date: Sunday 10/31/2010 at 12:33  Name: poorcitytileworkedchoice.sav.bz2 
Size: 15kB   By: dmarks

http://gna.org/bugs/download.php?file_id=11027

___

Reply to this item at:

  http://gna.org/bugs/?16983

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev