Final Fantasy Hacktics

Projects => Works in Progress => Tethical => Topic started by: Kivutar on July 29, 2013, 07:22:53 am

Title: Artificial Intelligence
Post by: Kivutar on July 29, 2013, 07:22:53 am
Hi everybody.

I've not followed Tethical progress for a while. Is there any progress on artificial intelligence?

If not, I've created a starting point for people who wants to try coding an AI for Tethical.

The code is on my github, in the AI branch here :

I know that this repo is not up to date, but I don't have access to the new one, so I put the code here and it can be ported.

What does this code do for now?

I added an 'ai' flag to characters so they can be controlled by the server instead of asking the clients. For now, I put the flag on every female character, so if you want to try the AI, you can just log in with two clients and create two teams of female only character, and watch the AI at work.

The AI is in the file server side. For now it does almost nothing : characters just move around at random places on the map without fighting.
However, I talked to fdc on IRC and he knows very well how AI works in FFT and want to try coding it's own AI based on how chess AI are done.

Here is a video showing the AI moving around :

Title: Re: Artificial Intelligence
Post by: thechancellor on July 29, 2013, 08:36:06 am
Looks quite promising, I must say.
Title: Re: Artificial Intelligence
Post by: lirmont on July 29, 2013, 01:50:52 pm
Good to hear from you! What I hope to do for the AI in my branch is to have a system similar to FF12's gambit system in the loosest sense that the system would be programmable. I haven't started that part. What I do have done is a wait-only AI. When I rewrote the battle system to be a battle state (which a game designer could write their own battle states and choose to direct the client to those instead of or in addition to the vanilla state), I put the Player/AI object beneath a move resolver abstraction. For instance, a player is likely to be a move resolver for everyone on their team, except in cases where they pick the AI to do it or they have a guest. So, the move resolvers are per-unit. Meaning, all kinds of fun things can be implemented in the future (like splitting up a large set of units to be handled by several different friends).

As for the picking that the AI actually has to do, I abstracted the very specific messages of the original battle loop into generic lists of options. So, the AI must only pick something from the list of options it is provided with (as the player would), and they are subservient to the server-side battle state loops. Messages are also JSON encoded now, so that they can be easily addressed. My "branch" doesn't use a versioning software, but, if you want a copy, send me a PM and I'll post a copy for you. I don't want it publicly available until its actually feature-complete, though.
Title: Re: Artificial Intelligence
Post by: reinoe on August 04, 2013, 02:25:49 pm
Creating specific A.I. would be very interesting.  I do want you to know that you've got a lot of supporters here.  Great job and keep at it and it's good to know you're making progress.