예제 #1
0
    all_AI_weights[pid - 1] = dmp["AI_weights"][0:TO + 1]
    all_AI_preds[pid - 1] = dmp["AI_preds"][0:TO + 1]

    ans_soc_skils[pid - 1], ans_rout[pid - 1], ans_switch[pid - 1], ans_imag[
        pid - 1], ans_fact_pat[pid - 1] = _rt.AQ28ans(
            "/Users/arai/Sites/taisen/DATA/%(data)s/%(date)s/%(pID)s/AQ29.txt"
            % {
                "date": partIDs[pid - 1][0:8],
                "pID": partIDs[pid - 1],
                "data": data
            })
    AQ28scrs[pid - 1], soc_skils[pid - 1], rout[pid - 1], switch[
        pid - 1], imag[pid - 1], fact_pat[pid - 1] = _rt.AQ28(
            "/Users/arai/Sites/taisen/DATA/%(data)s/%(date)s/%(pID)s/AQ29.txt"
            % {
                "date": partIDs[pid - 1][0:8],
                "pID": partIDs[pid - 1],
                "data": data
            })
    ages[pid - 1], gens[pid - 1], Engs[pid - 1] = _rt.Demo(
        "/Users/arai/Sites/taisen/DATA/%(data)s/%(date)s/%(pID)s/DQ1.txt" % {
            "date": partIDs[pid - 1][0:8],
            "pID": partIDs[pid - 1],
            "data": data
        })

    hdcol = 0

    hnd_dat_all[pid - 1] = _hnd_dat[0:TO]

    nR = len(_N.where(_hnd_dat[:, hdcol] == 1)[0])
예제 #2
0
soc_skils = _N.empty(len(partIDs))
rout      = _N.empty(len(partIDs))
switch    = _N.empty(len(partIDs))
imag      = _N.empty(len(partIDs))
fact_pat  = _N.empty(len(partIDs))
#

the_cnstrs = ["FixedSequence(__moRSP__, [1, 1, 2, 1, 3, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1]);",
              "FixedSequence(__moRSP__, [3, 1, 2, 3, 2, 1, 2, 3, 3, 1, 1, 1, 2, 1, 3, 3, 2, 1, 2, 3, 3, 1, 2, 1, 2, 1, 3, 2, 2, 3, 2, 1, 3, 3, 2, 2, 3, 1, 3, 1]);",
              "Mimic(__moRSP__, 0, 0.2);",
              "WTL(__moRSP__, [0.05, 0.85, 0.1], [1/3, 1/3, 1/3], [1/3, 1/3, 1/3], false);"]
              
pid = 0
for partID in partIDs:
    pid += 1
    AQ28scrs[pid-1], soc_skils[pid-1], rout[pid-1], switch[pid-1], imag[pid-1], fact_pat[pid-1] = _rt.AQ28("/Users/arai/Sites/taisen/DATA/TMB1/%(date)s/%(pID)s/AQ29.txt" % {"date" : partIDs[pid-1][0:8], "pID" : partIDs[pid-1]})

frmgm  = 20
for blk in range(4):   #  the blocks here are relative to 'the_cnstrs'
    pid = 0
    for partID in partIDs:
        pid += 1
        print("partID    %s" % partID)
        _hnd_dat, start_time, end_time, UA, cnstr            = _rt.return_hnd_dat(partID, has_useragent=True, has_start_and_end_times=True, has_constructor=True, visit=1, expt="TMB1", block=(blk+1))

        ind = the_cnstrs.index(cnstr)
        netwins[ind, pid-1] = _N.sum(_hnd_dat[frmgm:, 2])

        #############  HP wins case
        wins = _N.where(_hnd_dat[frmgm:-1, 2] == 1)[0]+frmgm      #  HP wins
        ww   = _N.where(_hnd_dat[wins+1, 2] == 1)[0]
예제 #3
0
    td, start_time, end_time, UA, cnstr = _rt.return_hnd_dat(
        partID,
        has_useragent=True,
        has_start_and_end_times=True,
        has_constructor=True,
        visit=1,
        expt=data,
        block=1)

    td_all[di] = td
    AQ28scrs[di], soc_skils[di], rout[di], switch[di], imag[di], fact_pat[
        di] = _rt.AQ28(
            "/Users/arai/Sites/taisen/DATA/%(data)s/%(date)s/%(pID)s/AQ29.txt"
            % {
                "date": partID[0:8],
                "pID": partID,
                "data": data
            })

    netwins[di] = _N.sum(td[:, 2])  # / td.shape[0]
    #  First find all the win conditions

    #  _W followed by a win

    #ic = -1
    for ic in range(3):  #condition in range(3):
        #ic += 1

        rep_cntr_noncntr, s_rep_cntr_noncntr = getTargetCR_cntrmvs(ic)