Ejemplo n.º 1
0
 private void RemoveArgumentAt(int position, bool humanDidIt)
 {
     if (GetArgListCodeBlocks()[position] != null)
     {
         if (humanDidIt)
         {
             LoggingManager.instance.UpdateLogColumn(SnapLoggingManager.GetSnapRemoveFromColName(),
                                                     string.Join("",
                                                                 "Remove ",
                                                                 argList[position].name,
                                                                 " from ",
                                                                 myCodeBlock.name,
                                                                 " at ",
                                                                 position.ToString()));
         }
         AudioManager.instance.PlaySoundAtObject(gameObject, AudioManager.popAudioClip);
         if (CodeBlockSnap.lastDraggedCBS != myCodeBlock.GetCodeBlockSnap())
         {
             argList[position].transform.localPosition = argList[position].transform.localPosition + new Vector3(0.25f, 1.1f, 1.25f);
         }
         argList[position].transform.SnapToCodeBlockManager();
         argList[position] = null;
         myCodeBlock.GetCodeBlockObjectMesh().ResizeChain();
     }
 }
Ejemplo n.º 2
0
        private void UpdateCuriosity(int len)
        {
            while (GetInforSeekingActionQueue().Count > len)
            {
                curiosity_t -= infoSeekingActionQueue.Dequeue();
            }
            int result = 0;

            if (LoggingManager.instance.GetValueInRowAt(ManipulationLoggingManager.GetColName()) != "")
            {
                result = 1;
            }
            else if (LoggingManager.instance.GetValueInRowAt(SnapLoggingManager.GetSnapToColName()) != "")
            {
                result = 1;
            }
            else if (LoggingManager.instance.GetValueInRowAt(SnapLoggingManager.GetSnapRemoveFromColName()) != "")
            {
                result = 1;
            }
            curiosity_t += result;

            float et = curiosity_t - curiosity_average;

            curiosity_average += et / totalTimeSteps;
            curiosity_SSE     += et * (curiosity_t - curiosity_average);

            infoSeekingActionQueue.Enqueue(result);


            LoggingManager.instance.UpdateLogColumn(humanCurtCol, curiosity_t.ToString("F3"));
            float zCur = GetZScoreCuriosity();

            if (!float.IsInfinity(zCur) && !float.IsNaN(zCur))
            {
                LoggingManager.instance.UpdateLogColumn(humanCurZScore, zCur.ToString("F3"));
            }
        }