Links to this post

You can use this BBCode to create a quick link to this post. Such links are created from yourforum URL and will stay valid in case your forum should move to a different URL at a later time.Hit Ctrl+C to copy the BBCode to the clipboard.

AI Defeat System

I made this system for fun, Maybe someone here will find a use for it.

The goal was to make it seem as if the AI was learning but not coded character specific. It records how quickly the AI was defeated in each round and adjusts its "random condition" by averaging the last 2 recorded rounds. If the round is won, to keep the "random condition from dropping, instead of recording the time it was defeated in, it records the average of the last 2 known rounds for that round.

This is my actual work file so there are tons of notes attached. If anyone thinks of improvement, Id' love to hear them.

There is a DisplayToClipboard too so you can keep an eye on whats happening. IntPersistIndex will need to be set to save vars from previous rounds, see notes below.

;==========================================================================;Goal:;-Make AI that appears to learn.;;==========================================================================;Achievements:;-AI knows how quickly it was defeated in previous round and Adjusts it's "random condition" as needed.;;==========================================================================;notes:;-set IntPersistIndex = 43 in constants part of the cns;-assumes timelimit is set to 99. This won't break (reduce probability) if it's not but it won't be as effective. ;-Round 1 has AI set to average. (AIlevel ** 2 / 64.0)*400);-borrowed ((root,AIlevel ** 2 / 64.0)*400) from Just No Point / XGargoyle. Used in base example of trigger use below.;-empty anim = 33333333 was added to air file for helper.;-if AI wins a round the last two recorded rounds are averaged together to make that rounds "random condition". ;;;base example of trigger use: n = normal "random condition" without AI Defeat System.;trigger1 = random < ((n + ((var(44) + var(45)) / 2)) * (AIlevel ** 2 / 64.0)) ;with AIlevel;trigger1 = random < (n + ((var(44) + var(45)) / 2)) ;--------------------------------------------------------------------------

;==========================================================================; AI Defeat System Initialization;==========================================================================; root Variable usage:; This is a record of the variables that are used;; var(44) - used to record AI's "random condition" after round ; var(45) - used to record AI's "random condition" after round ;--------------------------------------------------------------------------

;==========================================================================; AI Defeat System Helper;==========================================================================; numhelper(33333333) Variable usage:; This is a record of the variables that are used;; var(0) - used to manipulate AI formula. [state 33333333, AIlevel formula]; var(4) - used to record average of last to matches if round is won by AI. [state 33333333, Adjusts "random" *win]; var(5) - used to record amount of time ai was defeated in each round. [state 33333333, time keeper];--------------------------------------------------------------------------

Re: AI Defeat System

Cant wait to try this but I have a question, this is for arcade mode and any other mode correct?I got a little confused when you say it record the average of the last 2 rounds it made me think ofSurvival