Summary: Threaded AI cities generating Worker task requests
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Mon 18 Feb 2013 04:32:04 AM EET
                Category: ai
                Priority: 5 - Normal
                  Status: In Progress
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.5.0



This proof-of-concept patch adds first real work to threaded AI's subthread.
In the beginning of the player phase, cities evaluate potential worker tasks
in their area, and send best one to the main thread to set for the city. When
workers then have time, they take these tasks.

This still needs a lot of work before it gives as good results as current
model of settlers always looking for job themselves.
- Supports only a few worker tasks, no road or base building
- Assumes that any task it evaluates is possible, i.e., may request impossible
- Virtually no mutex protection so threads may handle the city simultaneously
leading them to get inconsistent values
- Does not give out values of the tasks. Worker may end working on
almost-zero-value task of one city when nearby city has urgent task.
- Does not care about lenght of the work, only about value of sfinished work


File Attachments:

Date: Mon 18 Feb 2013 04:32:04 AM EET  Name: ThreadedCityRequests.patch  Size:
7kB   By: cazfi



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to