# Q: Can a polygraph include random numbers?

**URL:** https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396
**Category:** Questions
**Created:** [August 3, 2022, 11:49am UTC](https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396 "2022-08-03T11:49:00Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Raj](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/raj/32/5127_2.png) [@Raj](https://cl.desmos.com/u/Raj)
#### Post date: [August 3, 2022, 11:49am UTC](https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396/1 "2022-08-03T11:49:01Z")

</div>

Dear Desmos folks,

I am experimenting with trying to make a polygraph paired-question-asking game which doesn’t use exactly the same elements every time.

Obviously this would need to be done with care, as the 16 tiles all need to remain distinct. The potential advantage would be to keep things fresh for the students, even if they play the game several times in a row.

I tried incorporating a random number generator into the graph for one of the tiles, but something strange happens.

When I put, for example:  
a = [1…10].random  
into a graph that makes one of the polygraph tiles, the result always seems to be the final number in the list. In other words, the random command doesn’t complain with an error, but it does appear to stop being random!

I thought I might be able to get around this by generating a random number in the CL, but polygraph doesn’t have any CL commands available at present.

There is already an element of randomness in that the tiles get shuffled for the question-asker. Is it possible also to shuffle them for the question-answerer? Anything that helps to vary one game from the next would be welcome.

Many thanks,

Raj

---

<div class="post-metadata">

### Author: ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)
#### Post date: [August 3, 2022, 4:20pm UTC](https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396/2 "2022-08-03T16:20:18Z")

</div>

Whether a polygraph or other activity, random in a graph will return the same values. Random in CL, however, will give unique values. So when the aim is different values each time (or for each student), you can use a random in the CL, or a random seed set in the CL to be used in the random value. I don’t that there is CL capability in polygraph though.

---

<div class="post-metadata">

### Author: ![Raj](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/raj/32/5127_2.png) [@Raj](https://cl.desmos.com/u/Raj)
#### Post date: [August 4, 2022, 3:00pm UTC](https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396/3 "2022-08-04T15:00:51Z")

</div>

Aha, that’s useful to know, thanks.

I hadn’t realised that a normal graph always gives the same initial random value, because I had been calling the random function via a user-click action. Each action-produced randmom-call does seem to produce a new value.

---

<div class="post-metadata">

### Author: ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)
#### Post date: [August 4, 2022, 4:44pm UTC](https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396/4 "2022-08-04T16:44:38Z")

</div>

Interesting, can you post an example? Just for my own personal knowledge.Thanks!

---

<div class="post-metadata">

### Author: ![Raj](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/raj/32/5127_2.png) [@Raj](https://cl.desmos.com/u/Raj)
#### Post date: [August 5, 2022, 8:25pm UTC](https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396/5 "2022-08-05T20:25:19Z")

</div>

Here’s an example: a logarithms game. The movement of the squirrel bouncing around involves repeatedly calling random(), via the ticker. Also, shuffle gets applied to lists to create random orderings:

> **[Logarithm-adding squirrel game • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/627355c1a7e2a1119b1d025a)**
>
> This game is to help people get a feel for the fact that log a + log b = log ab.
> 
> The goal is to stack two logs such that the sum of their logs is equal to the log of the target. Students can control the difficulty level, with higher amounts of...

---

<div class="post-metadata">

### Author: ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)
#### Post date: [August 6, 2022, 12:37am UTC](https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396/6 "2022-08-06T00:37:28Z")

</div>

Being called by the ticker must be doing it. I will note that the initial problem is always log14.

---

<div class="post-metadata">

### Author: ![Raj](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/raj/32/5127_2.png) [@Raj](https://cl.desmos.com/u/Raj)
#### Post date: [August 7, 2022, 2:34pm UTC](https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396/7 "2022-08-07T14:34:50Z")

</div>

Good point about the initial random call.

Out of interest, I’d be curious to hear what you think of the game, r if you have any comments or suggestions!

Raj

---

<div class="post-metadata">

### Author: ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)
#### Post date: [August 7, 2022, 8:15pm UTC](https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396/8 "2022-08-07T20:15:35Z")

</div>

It’s a fun idea. I had some difficulty when there was a short log I wanted to remove. It seems to be behind the grass image (set it to “Place behind graphs” in the long click menu), and can’t grab it. I understand it’s the target value, but the purple line just kind of bothers me visually. Maybe lower the opacity and/or make it a dotted line if you want to keep it. I think I’d get rid of the grid background as well, maybe a wall background or something instead if it looks too empty for you.

---

<div class="post-metadata">

### Author: ![Raj](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/raj/32/5127_2.png) [@Raj](https://cl.desmos.com/u/Raj)
#### Post date: [August 7, 2022, 11:55pm UTC](https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396/9 "2022-08-07T23:55:02Z")

</div>

Thanks, those are excellent suggestions!

---

<div class="post-metadata">

### Author: ![bhssingul](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/bhssingul/32/6761_2.png) [@bhssingul](https://cl.desmos.com/u/bhssingul)
#### Post date: [September 8, 2025, 12:08pm UTC](https://cl.desmos.com/t/q-can-a-polygraph-include-random-numbers/4396/10 "2025-09-08T12:08:47Z")

</div>

i have no idea what this is about
