PBEM vs. the PC

However you play online - Java, Vassal, Email, Cyanide etc - talk about it here.
This is also the place for discussing the various tools for managing leagues, teams and so on.

Moderator: TFF Mods

User avatar
Moonsong
Experienced
Experienced
Posts: 123
Joined: Fri Aug 16, 2002 11:32 pm
Location: Italy

PBEM vs. the PC

Post by Moonsong »

I've read in an old topic someone asking poor Galak to write an AI for his PBEM, so that we could play against the computer, and, though he was joking, my feverished brain started playin' with an idea. :?:
Some of you might have seen a game written by two crazed French guys, called "Blood Bowl Alive". Great 3D Blood Bowl, but full of bugs, and, what's worst, has been abandoned by his creators. Couldn't you ask the guys to borrow the AI from their game, and try to convert it to PBEM? At least, most of the work will be already done, and with just a few tweaks we could have what we have been dreaming of for years? :o

Moonsong

Reason: ''
[img]http://www.bluemax.com/animate/websitefAGIFdownloads/Flags/AllNations/G-N/italy_clr.gif[/img]NAF Italian Organiser
Deathwing
The Voice of Reason
Posts: 6449
Joined: Tue Jun 26, 2001 12:00 am
Contact:

Post by Deathwing »

BB Alive was abandoned when they realised the complexity (damn near impossibility) of programming the AI.

Reason: ''
Image

"Deathwing treats newcomers like sh*t"
"...the brain dead Mod.."
McDeth
Legend
Legend
Posts: 3016
Joined: Thu Jan 01, 1970 12:00 am
Location: Worcester, England
Contact:

Post by McDeth »

I think it might have been me who suggested it but it was only as a joke.

in reality there are just too many possibilities for the AI to contemplate, although i'm happy for someone to proove me wrong :lol:

Reason: ''
User avatar
GalakStarscraper
Godfather of Blood Bowl
Posts: 15882
Joined: Tue Jun 26, 2001 12:00 am
Location: Indiana, USA
Contact:

Post by GalakStarscraper »

I wrote an AI for a checkers game several years ago that was able to beat my ex-wife pretty consistently (but then again intelligence was not her strong suit).

However, writing an AI for BB ... yikes! :o

The approach I'd take would be along the lines of the handle the ball first strategy that I've seen good coaches use ... but to be completely honest this one is just beyond my abilities.

Galak

Reason: ''
Pink Horror
Emerging Star
Emerging Star
Posts: 501
Joined: Tue Jun 26, 2001 12:00 am
Location: San Jose, CA

Post by Pink Horror »

What the PBeM program needs is the ability to make use of an AI .dll. Then Galak and Ronald could let possible programmers know the interface instead of having to write AI themselves. I've done board game AIs before, and I've been known to play Blood Bowl like a machine, so I think I could get one done if the program was ready to interact with it.
McDeth wrote:in reality there are just too many possibilities for the AI to contemplate, although i'm happy for someone to proove me wrong
I think Blood Bowl's actually a relatively simple game compared to some of the games out there that have good AI. I think the biggest problem is getting the computer to figure out the right order for the moves.

The loop would go something like this:

AIObject AI;
StepStruct Next;
bool Turnover = false;
AI.Plan(GameObject);
while (! Turnover)
{
AI.NextMove(Next);
Turnover = PerformStep(Next, GameObject);
AI.Update(GameObject);
}

I don't know much about .dll's, but I think something like this can be done. The important part is that anything can be going on in the AI routines.



Pink Horror

Reason: ''
McDeth
Legend
Legend
Posts: 3016
Joined: Thu Jan 01, 1970 12:00 am
Location: Worcester, England
Contact:

Post by McDeth »

What i meant was something like, if a blitzer with Stand Firm, fails a dodge roll, would he choose a re-roll if available or go with stand Firm etc, or would a thrower GFI with without a re-roll if it meant he moved into another passing range etc.

the list is probably finite but the decision making process is complicated, hell i might try it one turn, but later on go with the other option, but then i've always been inconsistent.

Reason: ''
Dain
Veteran
Veteran
Posts: 238
Joined: Mon Aug 12, 2002 9:13 am
Location: Blonay, Switzerland

Post by Dain »

I don't know how AI works but we could imagine the computer calculate %success of actions and class them by higher rate.
If % success pass with Gfi is > % success without Gfi -->roll Gfi, then pass
If %success pass with Gfi is < % success without Gfi --> pass

The computer will do the higher % rate actions before hard ones.
Whereas us, we often roll block dice, stupid actions which are not necessary to score.

Then we could create "random" generator which sort the actions in order to put "human" random moves.
I think, we could find solutions, even if they aren't the best we hope.
All of you have seen that Ronald ' tool has changed a lot from the 1.6 release!
Why can't it be the same for the AI engine?

I think,the most difficult thing is to find somebody who can program this engine! Don't you know?
Dain

Reason: ''
Pink Horror
Emerging Star
Emerging Star
Posts: 501
Joined: Tue Jun 26, 2001 12:00 am
Location: San Jose, CA

Post by Pink Horror »

Ordering by chance for success is too simple. The computer might then do a bunch of pointless actions before doing an important action that's only slightly less likely to succeed. Also, the machine would have to be able to set up blocks through proper ordering. I think it can be done (not only that, but I think I can do it), but the program needs to have some way to incorporate a computer opponent. Let's leave all those pesky decisions about re-rolls and such to the hypothetical programmer (probably me) and just ask those in charge to make the first step. Galak, are you listening?



Pink Horror

Reason: ''
User avatar
DoubleSkulls
Da Admin
Posts: 8219
Joined: Wed May 08, 2002 12:55 pm
Location: Back in the UK
Contact:

Post by DoubleSkulls »

You actually have to look at the difficult bits of BB to realise what a task writing the AI would be.

What is a good position for all my players? How do I evaluate position A against position B?

Which block should I do first? The one that is more likely to succeed? Or the one the lets me move the ball carrier forward? How about the one that protects the current position of the ball carrier.

Do I leave my opponent a small chance of blitzing the ball carrier (in the hope that he fails and burns all his TRR's quickly)? Or do I play it safe?

Actually working out best odds, overlapping TZ's etc is easy. The difficult thing is understanding what you are trying to achieve in a sequence of moves.

The other thing that makes BB a nightmare to program is the chance of your turn ending at any point. Games are normally either turn based - this means the computer can evaluate lots of possible end-of-turn positions against one another and choose the best - or realtime constant re-evaluation of priorities (defend the base/gather more resources/launch and attack).

So, off the top of my head, I'd guess you are looking at at least 6 man-months work for a decent AI (i.e. it plays as well as a newbie), and that's probably from someone who has written AI for games before. No wonder those French blokes gave up.

Ian

Reason: ''
User avatar
GalakStarscraper
Godfather of Blood Bowl
Posts: 15882
Joined: Tue Jun 26, 2001 12:00 am
Location: Indiana, USA
Contact:

Post by GalakStarscraper »

I'm listening PH... just have a lot more pressing things on the plate at the moment ....

Galak

Reason: ''
Pink Horror
Emerging Star
Emerging Star
Posts: 501
Joined: Tue Jun 26, 2001 12:00 am
Location: San Jose, CA

Post by Pink Horror »

Six man-months seems over-estimating it. I would need maybe two. Getting the program to make good use of all the funny skills and other options in the game could take some time, but the core of blocking, moving, and passing isn't that complex. I have no nightmares thinking about having the machine plan a turn. If I ever get the chance to prove it, I'll take it.



Pink Horror

Reason: ''
User avatar
DoubleSkulls
Da Admin
Posts: 8219
Joined: Wed May 08, 2002 12:55 pm
Location: Back in the UK
Contact:

Post by DoubleSkulls »

Pink Horror wrote:Six man-months seems over-estimating it.
Well I was originally thought 3 months, but then I doubled it since that is a good idea on most projects. Murphys law always comes into play.

Ian

Reason: ''
Marcus
Da Tulip Champ I
Posts: 1664
Joined: Thu Jan 01, 1970 12:00 am
Location: Australian in London
Contact:

Post by Marcus »

I would suggest you need to have several options available for each move and rank them from conservative --> aggressive. You'd then need to randomise which option was chosen for each given action.

The main reason for this is that once you get into a situation where you can predict the AI's moves it becomes a turkey shoot.

I have a poker program that is regarded one of the best out there. I never lose to it simply because it never varies its bluffing strategy.

Marcus

Reason: ''
User avatar
Ghost of Pariah
Legend
Legend
Posts: 2249
Joined: Thu Jun 13, 2002 7:36 am
Location: Haunting the hallowed halls of TBB!
Contact:

Post by Ghost of Pariah »

Maybe by the time Pink gets around to it I will have graduated and I can help him. lol

Reason: ''
Traitor of the NBA!


I hate you all!
Exer
Rookie
Rookie
Posts: 18
Joined: Tue Sep 03, 2002 5:29 pm

Post by Exer »

If you guys ever do get around to it, you should do it so that the AI can be used with Java Bowl and TBT as well. I'm sure you'll make a lot of people happy.

Reason: ''
Post Reply