Jump to content

KotOR Pazaak AI Process


Recommended Posts

Got moved to the "KotOR General Discussion" forum so now there are (never intended) two Pazaak-thingy majigys. If you have a suggestion or problem with the Pure Pazaak program post it in the main thread here, but I suppose if you have an AI (my AI that is) related question or suggestion (like you seen it do something stupid) then feel free to ask here, although the general impression I'm getting is that the current AI I've written is too good :thumbsup:

 

Hi,

 

In-case you haven't seen me before I'm the guy that has made the Pure Pazaak standalone game (and the previous ones Pazaak Online/Arcade), and up until now I've used my own written AI since the whole thing was done without knowing any code stuff from the KotOR games.

 

Couple of days ago I decided to add as an option, the K2 AI into the game, following the algorithm described by Akari in this post/thread here. I've followed it through and created the matching code but there are a couple of holes that just don't seem right and I'd like to check whether that is all to the AI or if something was left out (especially if Akari was just working from memory).

 

If CurrentPossibleTotal == 19, then play the side card if our LowestPossibleTotal is 11 or less, unless the player has 20 (waste of a sidecard).

....blah blah blah....

After it decides what to do with its side deck, it then compares its score against the player's.

If the player has a higher score, then it won't stand.

If the player has a lower score, and the AI has a score of 18 or higher, it will stand no matter what.

So what happens if the AI plays a card to 19 but the player is also 19? This scenario is not covered so by default it just does End Turn for me since it doesn't match the case for stand because player score is not lower than AI score.

 

Uhh...to make this thread a bit more useful to others and not just devs feel free to comment on the Pazaak (KotOR or mine) AI in general.

 

Cheers

 

(wasn't sure whether to put in the K2 sub-section or not but since devs hang around here prolly more useful here)

Edited by dufflover

sigpic0yb.jpg

Pure Pazaak - The Stand-alone Multiplayer Pazaak Game (link to Obsidian board thread)

Pure Pazaak website (big thank you to fingolfin)

Link to comment
Share on other sites

Have you considered PMing Akari or some other dev? That way you might get answers. I'm sure you're the only one present in this board who has a grasp on what's happening on the background during a pazaak game against the AI. So, don't expect many suggestions or answers from here.

kirottu said:
I was raised by polar bears. I had to fight against blood thirsty wolves and rabid penguins to get my food. Those who were too weak to survive were sent to Sweden.

 

It has made me the man I am today. A man who craves furry hentai.

So let us go and embrace the rustling smells of unseen worlds

Link to comment
Share on other sites

Umm, personaly I love that seperate Pure Pazaak game you made, its totally cool man!!!

 

But sadly I cannot help you in this case, you might also want to ask in the Team Gizka forums, those guys is experts in KOTOR systems, they might be able to give you a hand. Want me to copy your thread and post it there? If there is anything els I can do... I will be honored if you would ask me... Good Luck,

 

Mossa TheGreat :D

Link to comment
Share on other sites

Have you considered PMing Akari or some other dev? That way you might get answers.

I was gonna PM Akari but he hasn't been on for a while :- and it would seem like a waste PM'ing as many devs possible.

 

Still, I'll send a PM to Akari now anyway (maybe another dev has seen this and can give him a heads up to check). Until then, I guess people may be able to fill the gap from their own experiences with K2 Pazaak (cos I don't have it installed). Anybody play recently and know whether the computer will stand if it plays a card and equals your score?

 

I'm sure you're the only one present in this board who has a grasp on what's happening on the background during a pazaak game against the AI.

Actually no. I know nothing about modding K2. All my work on it so far has been done on what a player can see/do. In short, all players see is the card the computer plays, and that's all I see too.

 

Lol, hey Mossa what's with the heart ? >_<

Edited by dufflover

sigpic0yb.jpg

Pure Pazaak - The Stand-alone Multiplayer Pazaak Game (link to Obsidian board thread)

Pure Pazaak website (big thank you to fingolfin)

Link to comment
Share on other sites

question for you dufflover: in your game, does the "dealer" draw from a pool of virtual cards (that are randomized at the beginning of the match) or does it just totally randomize any legal card and then deal that?

 

I am also curious how this operates in the official games, if anyone knows.

Link to comment
Share on other sites

question for you dufflover:  in your game, does the "dealer" draw from a pool of virtual cards (that are randomized at the beginning of the match) or does it just totally randomize any legal card and then deal that?

 

I am also curious how this operates in the official games, if anyone knows.

In the old Pazaak games it was completely random but now draws are from a finite deck.

 

Do you generate the 'draw' deck ahead of time or do you generate a 1 - 10 card randomly on each draw?  KotOR generated the deck before , then shuffled it randomly, then had the player and computer draw from the same deck.

Right now it's on-the-spot random because I don't know what the deck conditions are.

 

There's 4 of each card, 1 - 10, in the deck. So 40 cards total.

-Akari

sigpic0yb.jpg

Pure Pazaak - The Stand-alone Multiplayer Pazaak Game (link to Obsidian board thread)

Pure Pazaak website (big thank you to fingolfin)

Link to comment
Share on other sites

So what happens if the AI plays a card to 19 but the player is also 19? This scenario is not covered so by default it just does End Turn for me since it doesn't match the case for stand because player score is not lower than AI score.

 

I would implement it like you said, but with a slight modification. The AI should stand only if the player has already ended his turn. Since the chance of busting is high for the player on the next turn. If the player hits 20 the AI still keeps playing. This can be important if it's the deciding game for the player.

But whether the decision not to stand is right in other cases also depends on the sidecards of the player (existence of negative cards). A look at the player's cards might be helpful here... :):huh:

Edited by jedipodo

"Jedi poodoo!" - some displeased Dug

 

S.L.J. said he has already filmed his death scene and was visibly happy that he

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...