[Freeciv-Dev] Re: AI
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Sun, Sep 16, 2001 at 04:21:47AM -0700, Raahul
> Kumar wrote:
>
> > I noticed this. I sent some patches a long while
> back to Thue trying
> > to fix the movement code, because so much of the
> code has majic
> > numbers in it.
>
> Do you still want this? Do you have updated patched?
The code was accepted some time ago. I haven't sent
any new patches because I was beaten by the magic
number problem. I'll probably return to it some day.
Incidentally I noticed a small mistake in the code. In
the function below
+static unsigned int cache2_hash_val_fn(const void
*key,
+ unsigned int num_buckets)
+{
+ const struct cache2_key *pkey = (const struct
cache2_key *) key;
+ unsigned int result = 0;
+ int x, y;
+
+ for (x = 0; x < CITY_MAP_SIZE; x++) {
+ for (y = 0; y < CITY_MAP_SIZE; y++) {
+ result |= (pkey->worker_positions_used[x][y] !=
0);
+ result = result << 1;
you're still using for (x = 0; x < CITY_MAP_SIZE; x++)
{
+ for (y = 0; y < CITY_MAP_SIZE; y++) {
where everywhere else you seem to use city_map_iterate
> > A neural net? Where the hell is the learning
> through negative
> > feedback?
>
> > I think it is much closer to an exceptionally bad
> expert system,
> > with a lot of hard to find rules hidden in various
> places.
>
> Ack.
>
> > It doesn't even do much in the way of chosing
> which particular rule
> > to apply in a given situation.
>
> > > There are proposals to develop client-side AI
> > > through
> > > "Advisors" that humans can use to offload some
> of
> > > the
> > > mundane strategy aspects. Raimar is laying some
> of
> > > the
> > > infrastructure for this.
> >
> > I am interested in this.
>
> Fine.
>
> > Does this mean people could compete to produce the
> best AI?
>
> Yes.
>
> > Can you give me further details.
>
> My current code is attached. It may no be properly
> documented (but at
> least I use longer variable names) and may also not
> be apply cleanly
> to a current cvs version. I hope to get this and
> some futher agents
> into the code. Any feedback is welcome. The citizen
> management agent
> (CMA) is the most debugged and documented piece of
> code.
Actually I wanted to congratulate you. Most of the AI
code is impossible to follow, but I understood more of
your AI code in 5 mins of looking at it then I have of
the freeciv AI code and I've spent at least a few
weeks
trying to understand it. Still, put more comments in
please.
>
> > I wanted to know if there are any existing ideas
> about how to
> > implement a better AI. With the diplomacy system
> in place, we can
> > finally have a competitive AI player. With the AI
> trading techs and
> > making alliances the human player will finally
> have some difficulty
> > beating the AI. With someone else hopefully
> fixing the AI problems
> > with handling planes and ships a competitive late
> game AI could be
> > here.
>
> I think that a ai which is good at diplomacy is much
> more difficult
> that an ai which handle the basic game mechanics
> (tech tree
> management, city management,..) right.
I'm planning to start off small handling just trading
techs with players not currently at war with you. I'm
planning to have the AI by default share world maps.
I'm also going to solve the tribute problem, if you're
much bigger than the AI it will offer up tribute.
Incidentally, should I care about the civilisations
perfectionist etc tags at all. It's not used anywhere
in
freeciv as far as I can tell.
> Raimar
>
> --
> email: rf13@xxxxxxxxxxxxxxxxx
> "The Internet is really just a series of
> bottlenecks
> joined by high speed networks."
> -- Sam Wilson
>
> ATTACHMENT part 2 application/x-gzip
__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/
- [Freeciv-Dev] Re: AI,
Raahul Kumar <=
|
|