How can I make a gate with two cubes that close/open nonstop?

using System.Collections; using System.Collections.Generic; using UnityEngine;  public class Gate : MonoBehaviour {     public GameObject[] gateParts;      // Start is called before the first frame update     void Start()     {              }      // Update is called once per frame     void Update()     {         for (int i = 0; i < gateParts.Length; i++)         {             gateParts[i].transform.position = Vector3.MoveTowards(gateParts[i].transform.position, gateParts[i + 1].transform.position, Time.deltaTime * 3f);         }     } } 

I want to make both cubes to move each other when they collide or touch each other by distance then move them far from each other. close/open the gate nonstop.

Gate

Can the pocket dimension created by the mirror of life trapping be returned to by using the Gate spelll?

A wizard needs a few decades to think over a problem, and decides to do so in his mirror of life trapping to prevent himself from aging. He packs a bag full of writing supplies and a 5000gp diamond, and has a servant activate the mirror to trap the wizard inside. After a few years have past, the wizard realizes he misses his liquor cabinet, and casts Gate to return to his study. After grabbing a couple bottles and regaining his 9th level spell slot (he took too long and the gate had run its duration), he wishes to return to the mirror. Can the wizard recast gate and step back into the mirror, or must he return to the mirror by his servant reactivating the mirror? Does the extra dimensional cell remain in existence when the wizard leaves it, or collapse until the cell is refilled? What if the wizard leaves his notes, are they ejected when the wizard leaves?

If applicable, what other pocket dimension can or cannot be returned too in this way?

What Happens if I swap the forget gate and update gate in LSTM model?

Consider the following eqautions used in LSTM ( taken from Andrew ng’s course on Sequential model)

In an LSTM model, LSTM Cell has three inputs at any time step t

  • Input($ X_t , a^{(t-1)}, C^{(t-1)})$ ,

    Here $ X_t$ is the input vector, $ a^{(t-1)}$ is the previous hidden state and $ C^{(t-1)}$ is the previous cell state

Now the new cell state $ c^t$ is given by the following formula :

$ C^t = $ forget_gate * $ C^{(t-1)} + $ update_gate* $ \overline{C^t}$

Question:

If I swap the places of forget_gate and update_gate, I still get a valid $ C^t$ , So why are we multilyting the previous cell state with forget gate only and the current cell state with update gate only, what if Imultiply previous cell state with update gate ?

Edit : After swapping, the formula would look like this,

$ C^t = $ update_gate * $ C^{(t-1)} + $ forget_gate* $ \overline{C^t}$

enter image description here

GATE CSE 2018, Which of the following languages are context-free?


A] {ambncpdq | m+p = n+q, where m, n, p, q >=0}

B] {ambncpdq | m = n and p = q, where m, n, p, q >=0}

C] {ambncpdq | m = n = p and p not= q, where m, n, p, q >=0}

D] {ambncpdq | mn = p+q, where m, n, p, q >=0}

Instead of Formal proofs if any answer can provide telltale signs of a language being CFL or not will be more appreciated, because this question is taken from a competitive exam. Formal proofs are welcome too.

Here is my approach

A] I don’t have any idea for constructing PDA for this language, probably not a CFL. Also by pumping lemma splitting the word in ‘uvwxy’ for any ‘vwx’ (belonging to ‘akbk‘ and such combinations), the equality won’t hold. Thus not a CFL.

B] Is a CFL we can push a’s and pop on b’s, same for c’s and d’s.

C] Not a CFL, as we need two stacks, one for keeping count of |a|==|b| and second for |b|==|c|.

D] Not a CFL, cause we can’t construct a PDA, such a PDA will require capability to move back and forth on input string (for keeping track of m*n), which is not possible.

GATE CSE 2009, Which of the following is FALSE?

This is a question from GATE CSE 2009.

Which of the following is FALSE?

A] There is a unique minimal DFA for every regular language.

B] Every NFA can be converted to an equivalent PDA.

C] Complement of every context-free language is recursive.

D] Every non-deterministic PDA can be converted to an equivalent deterministic PDA.

The answer provided to me (without any explanation) is B, which I think is wrong.

Here is my approach.

A] Every RL has an equivalent DFA and there is one unique minimal DFA for a given RL. [so True]

B] Since RL are proper sub-set of CFL and every RL has equivalent FA and every CFL has equivalent PDA, every FA can be converted to PDA but not vice versa. [so True]

C] Given a CFL we can create an equivalent Total TM [RECURSIVE], RECURSIVE languages are closed under complement. [so True]

D] This is only remaining option and by method of elimination answer.

Is my answer correct?

Baldur’s gate: hire someone as “mercenary”

In Baldur’s Gate 1 and 2 (underlying dnd 2e, forgotten realms), you can add certain members to your party, and remove them freely. When you remove them, they keep the items they wear (which you can strip the moment before), and take no gold with them. I’m trying to roleplay a little, and this is absurd. So, what would be a fair amount of gold to give to a party member for being in a party for some time?

Some thoughts/additional points:

  • I read somewhere that this might be relevant to the amount of battles done. Let it be known that in this case, the amount of battles is maximum: everyday has many dangerous battles.

  • Splitting the party gold is one idea. It still might be unfair if the other characters have used gold to buy more expensive items than the npc leaving.

  • A specific amount of gold per days spent in party would be another idea. I’ve read that this would be dependent on level?

I am hoping that there would actually be some rule about this that I am not aware of.

Was Baldur’s Gate always a “Nest of Vipers”?

The Baldur’s Gate described in Baldur’s Gate: Descent Into Avernus has a “well earned reputation as a den of vipers (p.10)”:

As the adventure begins, the situation is especially dire:

However, when I looked at wikia article (admittedly an unofficial source), it describes Baldur’s Gate in a much more positive light:

It is a crowded city of commerce and opportunity, perhaps the most prosperous and influential merchant city on the western coast of Faerûn.

The strong peace-keeping force known as the Watch, along with the presence of the powerful Flaming Fists mercenary company, kept the city generally peaceful and safe.

Is the wikia article simply wrong? If not, how can these two views of the city be reconciled?