An environment in computer science consists of the following quintupel E = {X,Y,Z,d,l}.
X - the finite set of actions
Y - the finite set of looks
Z - the not necessary finite set of the points of the environment
d - is a partial function, d(P,x) where P ∈ Z and x ∈ X returns a new point P´
l - is a function l(P), which returns the look ∈ Y of the current point.

the P ∈ Z is normally not given, as it is the current point.
A punctured (I do not know if this is the right word) environment consists of the environment itself plus the start point O ∈ Z.

There are several different environments in computer science, such as Turing,RAM and Stack environment. All three are to complicated to be used as examples, I will write something about them later, and will hard link them.
The example environment is useful,too. It is the counting environment:
Z= N (set of all natural numbers)
l(0) = 0 otherwise l(n) = 1
d(0,-1) = not defined, otherwise d(n,x) = n+x
All this environment can do is count. The actions are: adding +1, -1 or 0. The 0 is needed if one works with more than one counting environment and wants to add something to one of them and let the other one unchanged.
The most interesting thing is that Y (the set of the looks) is not N but only consists of 2 elements. The reason for this is, that Y may not be infinite. The look is 1 if the point (here a member of N) is not equal to 0. If you want to find the value of a point, you have to do d(n,-1) till the look is = 0 and store the number of actions you did (and you should not forget to count back to the number, because otherwise the number is lost afterwards).

Some additional facts:

  • Every set of actions X contains at least one action "stop" (equivalent to 0 in the counting environment): d(P,stop) = P
  • The valence of a given point is the set of actions executable from this point: val(P) = {x ∈ X | d(P,x) &neq; n.d.} Example: val(0) = {0,+1), val(1) = (0,+1,-1)