Complete.Org: Mailing Lists: Archives: freeciv-ai: July 2003:
[freeciv-ai] Re: Hi, I'm back. aiclient
Home

[freeciv-ai] Re: Hi, I'm back. aiclient

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <i-freeciv-lists@xxxxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: Hi, I'm back. aiclient
From: Manuel Gutierrez Algaba <stemanolo@xxxxxxxx>
Date: Tue, 1 Jul 2003 19:34:53 +0200

El Mar 01 Jul 2003 08:09, Raimar Falke escribió:
>    Well, I simply got fed up of getting buggy backup files stored in
>    CD ROMS. I had a large .tar.gz file and then it corrupted, and I
>    lost 50 mb out of 650 mb. I decided to use a safer method, so that
>    if 1 % of the file gets corrupted then I don't lose the 100 \% of
>    the file.
>
> I thought the canonical solution for this problem is to add redundancy
> with Reed-Solomon or a similar algorithm. Par
> (http://parchive.sourceforge.net/) does this for example. The simpler
> solution is to burn a second CD with the same content.

Well, redundancy helps. 

> > There's no easy way to do AI, and the ideas are many, that requires that
> > the process is as abstract and structured as possible. Part of my project
> > was to feed each of the engines with "fake" data so that the debugging
> > was much faster. Having a socket-fed aiclient gives the possibility of
> > creating series of orders:
> > move settler 10,30;
> > fight falanx 7,6;
> > ...
> > so the ai can be debug without the need of running the entire program.
>
> While this is a nice idea it won't work IMHO. The problem is that the
> (at least a top-down) AI has to check the results of the
> commands. Example: you have a unit which has moves left. The AI
> decides that the unit should attack an enemy unit which is nearby. You
> issue the attack order by there is no fight. Where is there no fight?
> One cause could be that the enemy unit moved away. As a client AI you
> have to cope with a changing world. Here a server AI has an advantage
> because it can "freeze" the whole game until all of its actions are
> carried out. Back to the fight. There was no fight. So the client AI
> has to be aware of this and now since the unit still have moves left
> have to think about further actions.

Yes, but the idea is to "fake" the response (writing them by hand ) of the 
server or even you can write a fake-server (which may be hard or simple if 
that server is restricted to some parts of the gameplay) to answer those 
queries, and thus understanding/restructuring civserver... 

>
> So you could feed a state into the AI via the socket
> interface. However in the worst case you would got one commant out of
> the AI before the AI waits for the response. It is possible here that
> some other code which isn't "the entire program". But I think that
> programming this responder is hard and it is easier to use the real
> freeciv.
>
> > And thus , AI development is sped up.
>
> It will speed up because of other reasons: it is easy to debug, people
> can choose the language they know and so on.

Anyway, it's an idea, maybe with some alteration or improvement... 

>
> So you aren't going to code this interface? You want to code only the
> clisp aiclient?
>

That's right, but it's only because of a matter of economy, I'd need many 
hours to understand the socket C client and packets, you'd need many minutes, 
only. But, consider this just as a request. Some other users may ask you to 
code a better ai-diplomacy or a green frog in the corner of the canvas. I'm 
an user that request you this to become a developer. 

That interface would open a lot of possibilities, team-playing with the same 
civilization, just chaining civclient-civclient-civlient--> civserver 
using that interface. Or text based clients (I think there're already), in the 
long run. I don't know, it's a nice idea. And someone may want to appear in 
the Credits as the guy who made it real, just forward it to other lists, and 
someone may be interested. It can be a key part of the future. 

And writing clips aiclients? or PyLog clients? Yes, I do think I have the 
motivation, I've lost many games just by no managing correctly my units. I 
can't promise extremely good AI in two months. In fact, I'm starting soon a 
new job, and probably, I'll have much less spare time. 

Such interface would be the Pandora box, opened for all people wanting to 
improve the playability of civclient. And eventually, the hold for any AI 
programmer that now or ever reaches near here. 

---
mga


[Prev in Thread] Current Thread [Next in Thread]