automated-intelligence-tests 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- automated_intelligence_tests-0.1.0/PKG-INFO +58 -0
- automated_intelligence_tests-0.1.0/README.md +45 -0
- automated_intelligence_tests-0.1.0/aut/__init__.py +2 -0
- automated_intelligence_tests-0.1.0/aut/evaluate.py +13 -0
- automated_intelligence_tests-0.1.0/aut/instruct.py +31 -0
- automated_intelligence_tests-0.1.0/automated_intelligence_tests.egg-info/PKG-INFO +58 -0
- automated_intelligence_tests-0.1.0/automated_intelligence_tests.egg-info/SOURCES.txt +21 -0
- automated_intelligence_tests-0.1.0/automated_intelligence_tests.egg-info/dependency_links.txt +1 -0
- automated_intelligence_tests-0.1.0/automated_intelligence_tests.egg-info/requires.txt +2 -0
- automated_intelligence_tests-0.1.0/automated_intelligence_tests.egg-info/top_level.txt +5 -0
- automated_intelligence_tests-0.1.0/automated_intelligence_tests.py +37 -0
- automated_intelligence_tests-0.1.0/cat/__init__.py +2 -0
- automated_intelligence_tests-0.1.0/cat/data/cat_word_pairs_en.txt +22674 -0
- automated_intelligence_tests-0.1.0/cat/evaluate.py +48 -0
- automated_intelligence_tests-0.1.0/cat/instruct.py +88 -0
- automated_intelligence_tests-0.1.0/dat/__init__.py +2 -0
- automated_intelligence_tests-0.1.0/dat/evaluate.py +65 -0
- automated_intelligence_tests-0.1.0/dat/instruct.py +22 -0
- automated_intelligence_tests-0.1.0/pyproject.toml +24 -0
- automated_intelligence_tests-0.1.0/setup.cfg +4 -0
- automated_intelligence_tests-0.1.0/wrt/__init__.py +2 -0
- automated_intelligence_tests-0.1.0/wrt/evaluate.py +13 -0
- automated_intelligence_tests-0.1.0/wrt/instruct.py +36 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: automated-intelligence-tests
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Automated CAT, DAT, AUT and WRT intelligence tests for humans and AI
|
|
5
|
+
Author: dtzx00
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/dtzx00/Automated-Intelligence-Tests
|
|
8
|
+
Project-URL: Repository, https://github.com/dtzx00/Automated-Intelligence-Tests
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: glove-word-embeddings
|
|
12
|
+
Requires-Dist: numpy
|
|
13
|
+
|
|
14
|
+
# Automated Intelligence Tests
|
|
15
|
+
|
|
16
|
+
Minimal Python package providing automated tests of associative and creative ability for both humans and AI.
|
|
17
|
+
|
|
18
|
+
## Tests
|
|
19
|
+
|
|
20
|
+
| Test | Name | Status |
|
|
21
|
+
|------|-----------------------------|-----------------|
|
|
22
|
+
| CAT | Convergent Association Task | instruct + evaluate |
|
|
23
|
+
| DAT | Divergent Association Task | instruct + evaluate |
|
|
24
|
+
| AUT | Alternative Uses Task | instruct + placeholder evaluate |
|
|
25
|
+
| WRT | Creative Writing Task | instruct + placeholder evaluate |
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install glove-word-embeddings numpy
|
|
31
|
+
# then clone / pip install -e .
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
import automated_intelligence_tests as ait
|
|
38
|
+
|
|
39
|
+
# CAT
|
|
40
|
+
stim = ait.instruct("cat", n_items=10, seed=42)
|
|
41
|
+
score = ait.evaluate("cat", responses)
|
|
42
|
+
|
|
43
|
+
# DAT
|
|
44
|
+
stim = ait.instruct("dat")
|
|
45
|
+
score = ait.evaluate("dat", ["cat", "thimble", ...])
|
|
46
|
+
|
|
47
|
+
# AUT
|
|
48
|
+
stim = ait.instruct("aut") # or instruct("aut", object="brick")
|
|
49
|
+
# evaluate not yet implemented
|
|
50
|
+
|
|
51
|
+
# WRT
|
|
52
|
+
stim = ait.instruct("wrt") # or instruct("wrt", cues=["moon", "river", "whisper"])
|
|
53
|
+
# evaluate not yet implemented
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
See the individual `*/readme.md` files for details.
|
|
57
|
+
|
|
58
|
+
Depends only on `glove-word-embeddings` (for CAT/DAT) and numpy.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Automated Intelligence Tests
|
|
2
|
+
|
|
3
|
+
Minimal Python package providing automated tests of associative and creative ability for both humans and AI.
|
|
4
|
+
|
|
5
|
+
## Tests
|
|
6
|
+
|
|
7
|
+
| Test | Name | Status |
|
|
8
|
+
|------|-----------------------------|-----------------|
|
|
9
|
+
| CAT | Convergent Association Task | instruct + evaluate |
|
|
10
|
+
| DAT | Divergent Association Task | instruct + evaluate |
|
|
11
|
+
| AUT | Alternative Uses Task | instruct + placeholder evaluate |
|
|
12
|
+
| WRT | Creative Writing Task | instruct + placeholder evaluate |
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install glove-word-embeddings numpy
|
|
18
|
+
# then clone / pip install -e .
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
import automated_intelligence_tests as ait
|
|
25
|
+
|
|
26
|
+
# CAT
|
|
27
|
+
stim = ait.instruct("cat", n_items=10, seed=42)
|
|
28
|
+
score = ait.evaluate("cat", responses)
|
|
29
|
+
|
|
30
|
+
# DAT
|
|
31
|
+
stim = ait.instruct("dat")
|
|
32
|
+
score = ait.evaluate("dat", ["cat", "thimble", ...])
|
|
33
|
+
|
|
34
|
+
# AUT
|
|
35
|
+
stim = ait.instruct("aut") # or instruct("aut", object="brick")
|
|
36
|
+
# evaluate not yet implemented
|
|
37
|
+
|
|
38
|
+
# WRT
|
|
39
|
+
stim = ait.instruct("wrt") # or instruct("wrt", cues=["moon", "river", "whisper"])
|
|
40
|
+
# evaluate not yet implemented
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
See the individual `*/readme.md` files for details.
|
|
44
|
+
|
|
45
|
+
Depends only on `glove-word-embeddings` (for CAT/DAT) and numpy.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""AUT evaluate – placeholder.
|
|
2
|
+
|
|
3
|
+
Scoring for Alternative Uses Task is not yet implemented.
|
|
4
|
+
Typical approaches involve fluency, originality, flexibility and elaboration,
|
|
5
|
+
often using human ratings or embedding-based novelty metrics.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
def evaluate(responses, **kwargs):
|
|
9
|
+
"""Placeholder. Will later score creativity of the generated uses."""
|
|
10
|
+
raise NotImplementedError(
|
|
11
|
+
"AUT evaluation is not yet implemented. "
|
|
12
|
+
"Provide a list of uses (or the response dict from instruct) once scoring is ready."
|
|
13
|
+
)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""AUT – Alternative Uses Task instruct."""
|
|
2
|
+
import random
|
|
3
|
+
|
|
4
|
+
AUT_OBJECTS = [
|
|
5
|
+
"brick", "paperclip", "bucket", "sock", "fork", "knife",
|
|
6
|
+
"pencil", "pillow", "broom", "belt", "hat", "purse",
|
|
7
|
+
"comb", "baseball", "candle", "clock", "lighter", "lamp",
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
TEMPLATE = (
|
|
11
|
+
"What are some creative uses for this object: {object}?\n\n"
|
|
12
|
+
"The goal is to come up with creative uses, which are ideas that may strike "
|
|
13
|
+
"as clever, unusual, interesting, uncommon, humorous, innovative, or different.\n\n"
|
|
14
|
+
"Rules:\n"
|
|
15
|
+
"1. List as many creative uses as you can.\n"
|
|
16
|
+
"2. Answer in short phrases, one use per line.\n"
|
|
17
|
+
"3. Return only the list of uses, nothing else.\n"
|
|
18
|
+
"4. Do not return any thought process or explanations other than the list of uses.\n\n"
|
|
19
|
+
"Notes:\n"
|
|
20
|
+
"Return the uses as a plain list (one per line). Do not return anything else."
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
def instruct(object=None, seed=None):
|
|
24
|
+
rng = random.Random(seed)
|
|
25
|
+
obj = object if object is not None else rng.choice(AUT_OBJECTS)
|
|
26
|
+
return {
|
|
27
|
+
"test": "aut",
|
|
28
|
+
"object": obj,
|
|
29
|
+
"instructions": TEMPLATE.format(object=obj),
|
|
30
|
+
"response_format": {"object": obj, "uses": ["use 1", "use 2", "..."]},
|
|
31
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: automated-intelligence-tests
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Automated CAT, DAT, AUT and WRT intelligence tests for humans and AI
|
|
5
|
+
Author: dtzx00
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/dtzx00/Automated-Intelligence-Tests
|
|
8
|
+
Project-URL: Repository, https://github.com/dtzx00/Automated-Intelligence-Tests
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: glove-word-embeddings
|
|
12
|
+
Requires-Dist: numpy
|
|
13
|
+
|
|
14
|
+
# Automated Intelligence Tests
|
|
15
|
+
|
|
16
|
+
Minimal Python package providing automated tests of associative and creative ability for both humans and AI.
|
|
17
|
+
|
|
18
|
+
## Tests
|
|
19
|
+
|
|
20
|
+
| Test | Name | Status |
|
|
21
|
+
|------|-----------------------------|-----------------|
|
|
22
|
+
| CAT | Convergent Association Task | instruct + evaluate |
|
|
23
|
+
| DAT | Divergent Association Task | instruct + evaluate |
|
|
24
|
+
| AUT | Alternative Uses Task | instruct + placeholder evaluate |
|
|
25
|
+
| WRT | Creative Writing Task | instruct + placeholder evaluate |
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install glove-word-embeddings numpy
|
|
31
|
+
# then clone / pip install -e .
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
import automated_intelligence_tests as ait
|
|
38
|
+
|
|
39
|
+
# CAT
|
|
40
|
+
stim = ait.instruct("cat", n_items=10, seed=42)
|
|
41
|
+
score = ait.evaluate("cat", responses)
|
|
42
|
+
|
|
43
|
+
# DAT
|
|
44
|
+
stim = ait.instruct("dat")
|
|
45
|
+
score = ait.evaluate("dat", ["cat", "thimble", ...])
|
|
46
|
+
|
|
47
|
+
# AUT
|
|
48
|
+
stim = ait.instruct("aut") # or instruct("aut", object="brick")
|
|
49
|
+
# evaluate not yet implemented
|
|
50
|
+
|
|
51
|
+
# WRT
|
|
52
|
+
stim = ait.instruct("wrt") # or instruct("wrt", cues=["moon", "river", "whisper"])
|
|
53
|
+
# evaluate not yet implemented
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
See the individual `*/readme.md` files for details.
|
|
57
|
+
|
|
58
|
+
Depends only on `glove-word-embeddings` (for CAT/DAT) and numpy.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
automated_intelligence_tests.py
|
|
3
|
+
pyproject.toml
|
|
4
|
+
aut/__init__.py
|
|
5
|
+
aut/evaluate.py
|
|
6
|
+
aut/instruct.py
|
|
7
|
+
automated_intelligence_tests.egg-info/PKG-INFO
|
|
8
|
+
automated_intelligence_tests.egg-info/SOURCES.txt
|
|
9
|
+
automated_intelligence_tests.egg-info/dependency_links.txt
|
|
10
|
+
automated_intelligence_tests.egg-info/requires.txt
|
|
11
|
+
automated_intelligence_tests.egg-info/top_level.txt
|
|
12
|
+
cat/__init__.py
|
|
13
|
+
cat/evaluate.py
|
|
14
|
+
cat/instruct.py
|
|
15
|
+
cat/data/cat_word_pairs_en.txt
|
|
16
|
+
dat/__init__.py
|
|
17
|
+
dat/evaluate.py
|
|
18
|
+
dat/instruct.py
|
|
19
|
+
wrt/__init__.py
|
|
20
|
+
wrt/evaluate.py
|
|
21
|
+
wrt/instruct.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Automated Intelligence Tests: CAT, DAT, AUT and WRT.
|
|
2
|
+
|
|
3
|
+
Minimal package for association, alternative-uses and creative-writing tests.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from cat.instruct import instruct as cat_instruct
|
|
7
|
+
from cat.evaluate import evaluate as cat_evaluate
|
|
8
|
+
from dat.instruct import instruct as dat_instruct
|
|
9
|
+
from dat.evaluate import evaluate as dat_evaluate
|
|
10
|
+
from aut.instruct import instruct as aut_instruct
|
|
11
|
+
from aut.evaluate import evaluate as aut_evaluate
|
|
12
|
+
from wrt.instruct import instruct as wrt_instruct
|
|
13
|
+
from wrt.evaluate import evaluate as wrt_evaluate
|
|
14
|
+
|
|
15
|
+
__version__ = "0.1.0"
|
|
16
|
+
|
|
17
|
+
def instruct(test: str, **kwargs):
|
|
18
|
+
if test == "cat":
|
|
19
|
+
return cat_instruct(**kwargs)
|
|
20
|
+
if test == "dat":
|
|
21
|
+
return dat_instruct(**kwargs)
|
|
22
|
+
if test == "aut":
|
|
23
|
+
return aut_instruct(**kwargs)
|
|
24
|
+
if test == "wrt":
|
|
25
|
+
return wrt_instruct(**kwargs)
|
|
26
|
+
raise ValueError(f"Unknown test: {test}. Use 'cat', 'dat', 'aut' or 'wrt'.")
|
|
27
|
+
|
|
28
|
+
def evaluate(test: str, responses, **kwargs):
|
|
29
|
+
if test == "cat":
|
|
30
|
+
return cat_evaluate(responses, **kwargs)
|
|
31
|
+
if test == "dat":
|
|
32
|
+
return dat_evaluate(responses, **kwargs)
|
|
33
|
+
if test == "aut":
|
|
34
|
+
return aut_evaluate(responses, **kwargs)
|
|
35
|
+
if test == "wrt":
|
|
36
|
+
return wrt_evaluate(responses, **kwargs)
|
|
37
|
+
raise ValueError(f"Unknown test: {test}. Use 'cat', 'dat', 'aut' or 'wrt'.")
|