def __init__(self): super(ImgEnv, self).__init__() self.Nm = str() self.SetTags("Nm", 'desc:"name of this environment"') self.Dsc = str() self.SetTags("Dsc", 'desc:"description of this environment"') self.ImageFiles = [] self.SetTags("ImageFiles", 'desc:"paths to images"') self.Images = [] self.SetTags("Images", 'desc:"images (preload for speed)"') self.ImageIdx = env.CurPrvInt() self.SetTags("ImageIdx", 'desc:"current image index"') self.Vis = Vis() self.SetTags("Vis", 'desc:"visual processing params"') self.XFormRand = vxform.Rand() self.SetTags("XFormRand", 'desc:"random transform parameters"') self.XForm = vxform.XForm() self.SetTags("XForm", 'desc:"current -- prev transforms"') self.Run = env.Ctr() self.SetTags( "Run", 'view:"inline" desc:"current run of model as provided during Init"' ) self.Epoch = env.Ctr() self.SetTags( "Epoch", 'view:"inline" desc:"number of times through Seq.Max number of sequences"' ) self.Trial = env.Ctr() self.SetTags( "Trial", 'view:"inline" desc:"trial is the step counter within epoch"') self.OrigImg = etensor.Float32() self.SetTags("OrigImg", 'desc:"original image prior to random transforms"')
def __init__(self): super(ProbeEnv, self).__init__() self.Nm = str() self.SetTags("Nm", 'desc:"name of this environment"') self.Dsc = str() self.SetTags("Dsc", 'desc:"description of this environment"') self.Words = go.Slice_string() self.SetTags( "Words", 'desc:"list of words used for activating state units according to index"' ) self.WordState = etensor.Float32() self.SetTags("WordState", 'desc:"current sentence activation state"') self.Run = env.Ctr() self.SetTags( "Run", 'view:"inline" desc:"current run of model as provided during Init"' ) self.Epoch = env.Ctr() self.SetTags( "Epoch", 'view:"inline" desc:"number of times through Seq.Max number of sequences"' ) self.Trial = env.Ctr() self.SetTags( "Trial", 'view:"inline" desc:"trial is the step counter within sequence - how many steps taken within current sequence -- it resets to 0 at start of each sequence"' )
def __init__(self): super(SIREnv, self).__init__() self.Nm = str() self.SetTags("Nm", 'desc:"name of this environment"') self.Dsc = str() self.SetTags("Dsc", 'desc:"description of this environment"') self.NStim = int(4) self.SetTags("NStim", 'desc:"number of different stimuli that can be maintained"') self.RewVal = float(1) self.SetTags("RewVal", 'desc:"value for reward, based on whether model output = target"') self.NoRewVal = float(0) self.SetTags("NoRewVal", 'desc:"value for non-reward"') self.Act = Actions.Store self.SetTags("Act", 'desc:"current action"') self.Stim = int() self.SetTags("Stim", 'desc:"current stimulus"') self.Maint = int() self.SetTags("Maint", 'desc:"current stimulus being maintained"') self.Input = etensor.Float64() self.SetTags("Input", 'desc:"input pattern with action + stim"') self.Output = etensor.Float64() self.SetTags("Output", 'desc:"output pattern of what to respond"') self.Reward = etensor.Float64() self.SetTags("Reward", 'desc:"reward value"') self.Run = env.Ctr() self.SetTags("Run", 'view:"inline" desc:"current run of model as provided during Init"') self.Epoch = env.Ctr() self.SetTags("Epoch", 'view:"inline" desc:"number of times through Seq.Max number of sequences"') self.Trial = env.Ctr() self.SetTags("Trial", 'view:"inline" desc:"trial is the step counter within epoch"')
def __init__(self): super(CondEnv, self).__init__() self.Nm = str() self.SetTags("Nm", 'desc:"name of this environment"') self.Dsc = str() self.SetTags("Dsc", 'desc:"description of this environment"') self.TotTime = int() self.SetTags("TotTime", 'desc:"total time for trial"') self.CSA = OnOff() self.SetTags( "CSA", 'view:"inline" desc:"Conditioned stimulus A (e.g., Tone)"') self.CSB = OnOff() self.SetTags( "CSB", 'view:"inline" desc:"Conditioned stimulus B (e.g., Light)"') self.CSC = OnOff() self.SetTags("CSC", 'view:"inline" desc:"Conditioned stimulus C"') self.US = OnOff() self.SetTags("US", 'view:"inline" desc:"Unconditioned stimulus -- reward"') self.RewVal = float() self.SetTags("RewVal", 'desc:"value for reward"') self.NoRewVal = float() self.SetTags("NoRewVal", 'desc:"value for non-reward"') self.Input = etensor.Float64() self.SetTags("Input", 'desc:"one-hot input representation of current option"') self.Reward = etensor.Float64() self.SetTags("Reward", 'desc:"single reward value"') self.Run = env.Ctr() self.SetTags( "Run", 'view:"inline" desc:"current run of model as provided during Init"' ) self.Epoch = env.Ctr() self.SetTags( "Epoch", 'view:"inline" desc:"number of times through Seq.Max number of sequences"' ) self.Trial = env.Ctr() self.SetTags( "Trial", 'view:"inline" desc:"one trial is a pass through all TotTime Events"' ) self.Event = env.Ctr() self.SetTags( "Event", 'view:"inline" desc:"event is one time step within Trial -- e.g., CS turning on, etc"' )
def __init__(self): super(LEDEnv, self).__init__() self.Nm = str() self.SetTags("Nm", 'desc:"name of this environment"') self.Dsc = str() self.SetTags("Dsc", 'desc:"description of this environment"') self.Draw = LEDraw() self.SetTags("Draw", 'desc:"draws LEDs onto image"') self.Vis = Vis() self.SetTags("Vis", 'desc:"visual processing params"') self.MinLED = int() self.SetTags( "MinLED", 'min:"0" max:"19" desc:"minimum LED number to draw (0-19)"') self.MaxLED = int() self.SetTags( "MaxLED", 'min:"0" max:"19" desc:"maximum LED number to draw (0-19)"') self.CurLED = int() self.SetTags("CurLED", 'inactive:"+" desc:"current LED number that was drawn"') self.PrvLED = int() self.SetTags("PrvLED", 'inactive:"+" desc:"previous LED number that was drawn"') self.XFormRand = vxform.Rand() self.SetTags("XFormRand", 'desc:"random transform parameters"') self.XForm = vxform.XForm() self.SetTags("XForm", 'desc:"current -- prev transforms"') self.Run = env.Ctr() self.SetTags( "Run", 'view:"inline" desc:"current run of model as provided during Init"' ) self.Epoch = env.Ctr() self.SetTags( "Epoch", 'view:"inline" desc:"number of times through Seq.Max number of sequences"' ) self.Trial = env.Ctr() self.SetTags( "Trial", 'view:"inline" desc:"trial is the step counter within epoch"') self.OrigImg = etensor.Float32() self.SetTags("OrigImg", 'desc:"original image prior to random transforms"') self.Output = etensor.Float32() self.SetTags("Output", 'desc:"CurLED one-hot output tensor"')
def __init__(self): super(SemEnv, self).__init__() self.Nm = str() self.SetTags("Nm", 'desc:"name of this environment"') self.Dsc = str() self.SetTags("Dsc", 'desc:"description of this environment"') self.Sequential = False self.SetTags( "Sequential", 'desc:"if true, go sequentially through paragraphs -- else permuted"' ) self.Order = go.Slice_int() self.SetTags( "Order", 'desc:"permuted order of paras to present if not sequential -- updated every time through the list"' ) self.TextFiles = [] self.SetTags("TextFiles", 'desc:"paths to text files"') self.Words = go.Slice_string() self.SetTags("Words", 'desc:"list of words, in alpha order"') self.WordMap = {} self.SetTags("WordMap", 'view:"-" desc:"map of words onto index in Words list"') self.CurParaState = etensor.Float32() self.SetTags("CurParaState", 'desc:"current para activation state"') self.Paras = [] self.SetTags("Paras", 'view:"-" desc:"paragraphs"') self.ParaLabels = [] self.SetTags( "ParaLabels", 'view:"-" desc:"special labels for each paragraph (provided in first word of para)"' ) self.Run = env.Ctr() self.SetTags( "Run", 'view:"inline" desc:"current run of model as provided during Init"' ) self.Epoch = env.Ctr() self.SetTags( "Epoch", 'view:"inline" desc:"number of times through Seq.Max number of sequences"' ) self.Trial = env.Ctr() self.SetTags( "Trial", 'view:"inline" desc:"trial is the step counter within epoch -- this is the index into Paras"' )
def __init__(self): super(BanditEnv, self).__init__() self.Nm = str() self.SetTags("Nm", 'desc:"name of this environment"') self.Dsc = str() self.SetTags("Dsc", 'desc:"description of this environment"') self.N = int() self.SetTags("N", 'desc:"number of different inputs"') self.P = [] self.SetTags("P", 'desc:"no-inline" desc:"probabilities for each option"') self.RewVal = float(1) self.SetTags("RewVal", 'desc:"value for reward"') self.NoRewVal = float(-1) self.SetTags("NoRewVal", 'desc:"value for non-reward"') self.Option = env.CurPrvInt() self.SetTags("Option", 'desc:"bandit option current / prev"') self.RndOpt = True self.SetTags( "RndOpt", 'desc:"if true, select option at random each Step -- otherwise must be set externally (e.g., by model)"' ) self.Input = etensor.Float64() self.SetTags("Input", 'desc:"one-hot input representation of current option"') self.Reward = etensor.Float64() self.SetTags("Reward", 'desc:"single reward value"') self.Run = env.Ctr() self.SetTags( "Run", 'view:"inline" desc:"current run of model as provided during Init"' ) self.Epoch = env.Ctr() self.SetTags( "Epoch", 'view:"inline" desc:"number of times through Seq.Max number of sequences"' ) self.Trial = env.Ctr() self.SetTags( "Trial", 'view:"inline" desc:"trial is the step counter within epoch"')
def __init__(self): super(SentGenEnv, self).__init__() self.Nm = str() self.SetTags("Nm", 'desc:"name of this environment"') self.Dsc = str() self.SetTags("Dsc", 'desc:"description of this environment"') self.Rules = esg.Rules() self.SetTags( "Rules", 'desc:"core sent-gen rules -- loaded from a grammar / rules file -- Gen() here generates one sentence"' ) self.PPassive = float() self.SetTags( "PPassive", 'desc:"probability of generating passive sentence forms"') self.WordTrans = {} self.SetTags( "WordTrans", 'desc:"translate unambiguous words into ambiguous words"') self.Words = go.Slice_string() self.SetTags( "Words", 'desc:"list of words used for activating state units according to index"' ) self.WordMap = {} self.SetTags("WordMap", 'desc:"map of words onto index in Words list"') self.Roles = [] self.SetTags( "Roles", 'desc:"list of roles used for activating state units according to index"' ) self.RoleMap = {} self.SetTags("RoleMap", 'desc:"map of roles onto index in Roles list"') self.Fillers = [] self.SetTags( "Fillers", 'desc:"list of filler concepts used for activating state units according to index"' ) self.FillerMap = {} self.SetTags("FillerMap", 'desc:"map of roles onto index in Words list"') self.AmbigVerbs = [] self.SetTags("AmbigVerbs", 'desc:"ambiguous verbs"') self.AmbigNouns = [] self.SetTags("AmbigNouns", 'desc:"ambiguous nouns"') self.AmbigVerbsMap = {} self.SetTags("AmbigVerbsMap", 'desc:"map of ambiguous verbs"') self.AmbigNounsMap = {} self.SetTags("AmbigNounsMap", 'desc:"map of ambiguous nouns"') self.CurSentOrig = [] self.SetTags( "CurSentOrig", 'desc:"original current sentence as generated from Rules"') self.CurSent = [] self.SetTags( "CurSent", 'desc:"current sentence, potentially transformed to passive form"') self.NAmbigNouns = int() self.SetTags("NAmbigNouns", 'desc:"number of ambiguous nouns"') self.NAmbigVerbs = int() self.SetTags("NAmbigVerbs", 'desc:"number of ambiguous verbs (0 or 1)"') self.SentInputs = [] self.SetTags( "SentInputs", 'desc:"generated sequence of sentence inputs including role-filler queries"' ) self.SentIdx = env.CurPrvInt() self.SetTags("SentIdx", 'desc:"current index within sentence inputs"') self.QType = str() self.SetTags( "QType", 'desc:"current question type -- from 4th value of SentInputs"') self.WordState = etensor.Float32() self.SetTags("WordState", 'desc:"current sentence activation state"') self.RoleState = etensor.Float32() self.SetTags("RoleState", 'desc:"current role query activation state"') self.FillerState = etensor.Float32() self.SetTags("FillerState", 'desc:"current filler query activation state"') self.Run = env.Ctr() self.SetTags( "Run", 'view:"inline" desc:"current run of model as provided during Init"' ) self.Epoch = env.Ctr() self.SetTags( "Epoch", 'view:"inline" desc:"number of times through Seq.Max number of sequences"' ) self.Seq = env.Ctr() self.SetTags("Seq", 'view:"inline" desc:"sequence counter within epoch"') self.Tick = env.Ctr() self.SetTags("Tick", 'view:"inline" desc:"tick counter within sequence"') self.Trial = env.Ctr() self.SetTags( "Trial", 'view:"inline" desc:"trial is the step counter within sequence - how many steps taken within current sequence -- it resets to 0 at start of each sequence"' )